aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/rest/tests/test_lists.py
diff options
context:
space:
mode:
authorJ08nY2017-07-19 20:43:24 +0200
committerJ08nY2017-07-19 21:46:39 +0200
commitf0670baf7f66faab8ed4f16d393eea8a570f9630 (patch)
treedfe4669827c0171bfb45f5a50f6093216d05761b /src/mailman_pgp/rest/tests/test_lists.py
parent63b7097f67dfcbd95c4df359d31374e8849a666c (diff)
downloadmailman-pgp-feature/outgoing.tar.gz
mailman-pgp-feature/outgoing.tar.zst
mailman-pgp-feature/outgoing.zip
Diffstat (limited to 'src/mailman_pgp/rest/tests/test_lists.py')
-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/'