Commit b8311ffc authored by juga's avatar juga
Browse files

Move common tests to different file

parent 3283d5ab
Loading
Loading
Loading
Loading
Loading

tests/test_common.py

0 → 100644
+14 −0
Original line number Diff line number Diff line
import pytest

from mixnet import common, exceptions


def test_import_keys_succeed(import_keys, alice_sec_key_data):
    common.import_keys(alice_sec_key_data)
    # XXX: How to verify the keys are in the pep keyring?>


def test_import_keys_not_imported(import_keys, alice_sec_key_data):
    with pytest.raises(exceptions.PepNoKeyImported) as e:
        common.import_keys("foo")
    assert str(e.value) == "No key imported."
+0 −11
Original line number Diff line number Diff line
@@ -106,17 +106,6 @@ def test_decrypt_email_no_keys(
    assert str(e.value) == "Email not decrypted."


def test_import_keys_succeed(import_keys, alice_sec_key_data):
    common.import_keys(alice_sec_key_data)
    # XXX: How to verify the keys are in the pep keyring?>


def test_import_keys_not_imported(import_keys, alice_sec_key_data):
    with pytest.raises(exceptions.PepNoKeyImported) as e:
        common.import_keys("foo")
    assert str(e.value) == "No key imported."


def test_set_identity_decrypt(
    set_env,
    bob_sec_key_data,