aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/rest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/rest/tests')
-rw-r--r--src/mailman_pgp/rest/tests/test_lists.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman_pgp/rest/tests/test_lists.py b/src/mailman_pgp/rest/tests/test_lists.py
index c5c9854..2ebac6b 100644
--- a/src/mailman_pgp/rest/tests/test_lists.py
+++ b/src/mailman_pgp/rest/tests/test_lists.py
@@ -21,8 +21,9 @@ from mailman.app.lifecycle import create_list
from mailman.testing.helpers import call_api
from pgpy import PGPKey
-from mailman_pgp.database import mm_transaction
+from mailman_pgp.database import mm_transaction, transaction
from mailman_pgp.model.list import PGPMailingList
+from mailman_pgp.pgp.tests.base import load_key
from mailman_pgp.testing.layers import PGPRESTLayer
@@ -63,8 +64,9 @@ class TestLists(TestCase):
with mm_transaction():
mlist = create_list('another@example.com',
style_name='pgp-default')
+ with transaction():
pgp_list = PGPMailingList.for_list(mlist)
- pgp_list.generate_key(True)
+ pgp_list.key = load_key('ecc_p256.priv.asc')
json, response = call_api(
'http://localhost:9001/3.1/plugins/pgp/lists/'