Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanDeveloper committed Jan 18, 2023
1 parent 44c7ecf commit fdff8e2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/test_key.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

import ffpass
import ffpass_next
from pathlib import Path
import pytest

Expand All @@ -9,30 +9,30 @@


def test_firefox_key():
key = ffpass.getKey(Path('tests/firefox-84'))
key = ffpass_next.getKey(Path('tests/firefox-84'))
assert key == TEST_KEY


def test_firefox_mp_key():
key = ffpass.getKey(Path('tests/firefox-mp-84'), MASTER_PASSWORD)
key = ffpass_next.getKey(Path('tests/firefox-mp-84'), MASTER_PASSWORD)
assert key == TEST_KEY


def test_firefox_wrong_masterpassword_key():
with pytest.raises(ffpass.WrongPassword):
ffpass.getKey(Path('tests/firefox-mp-84'), 'wrongpassword')
with pytest.raises(ffpass_next.WrongPassword):
ffpass_next.getKey(Path('tests/firefox-mp-84'), 'wrongpassword')


def test_legacy_firefox_key():
key = ffpass.getKey(Path('tests/firefox-70'))
key = ffpass_next.getKey(Path('tests/firefox-70'))
assert key == TEST_KEY


def test_legacy_firefox_mp_key():
key = ffpass.getKey(Path('tests/firefox-mp-70'), MASTER_PASSWORD)
key = ffpass_next.getKey(Path('tests/firefox-mp-70'), MASTER_PASSWORD)
assert key == TEST_KEY


def test_legacy_firefox_wrong_masterpassword_key():
with pytest.raises(ffpass.WrongPassword):
ffpass.getKey(Path('tests/firefox-mp-70'), 'wrongpassword')
with pytest.raises(ffpass_next.WrongPassword):
ffpass_next.getKey(Path('tests/firefox-mp-70'), 'wrongpassword')

0 comments on commit fdff8e2

Please sign in to comment.