summaryrefslogtreecommitdiff
path: root/src/mailman_pgp/runners
diff options
context:
space:
mode:
authorJ08nY2017-07-06 23:21:01 +0200
committerJ08nY2017-07-06 23:21:01 +0200
commit2c4c5cb0c122d3bf6700276ec6cdd2c28ba36a9a (patch)
treea3cc2347eae4157a79c3cc53a94ecdcaab426524 /src/mailman_pgp/runners
parent2b93808035a9d152eb7164424b767497160188bf (diff)
downloadmailman-pgp-2c4c5cb0c122d3bf6700276ec6cdd2c28ba36a9a.tar.gz
mailman-pgp-2c4c5cb0c122d3bf6700276ec6cdd2c28ba36a9a.tar.zst
mailman-pgp-2c4c5cb0c122d3bf6700276ec6cdd2c28ba36a9a.zip
Diffstat (limited to 'src/mailman_pgp/runners')
-rw-r--r--src/mailman_pgp/runners/tests/test_incoming.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mailman_pgp/runners/tests/test_incoming.py b/src/mailman_pgp/runners/tests/test_incoming.py
index f98aede..f879bc5 100644
--- a/src/mailman_pgp/runners/tests/test_incoming.py
+++ b/src/mailman_pgp/runners/tests/test_incoming.py
@@ -49,6 +49,8 @@ class TestIncoming(TestCase):
self.mlist.subscribe(self.sender, MemberRole.member)
self.pgp_list = PGPMailingList.for_list(self.mlist)
+ while self.pgp_list.pubkey is None:
+ sleep(1)
sender_key = load_key('data/rsa_1024.pub.asc')
with transaction() as t:
@@ -102,11 +104,6 @@ To: ordinary@example.com
get_queue_messages('in_default', expected_count=1)
def test_decrypt(self):
- for i in range(15): # pragma: no cover
- if self.pgp_list.pubkey is not None:
- break
- sleep(1)
-
payload = 'Some encrypted text.'
pmsg = PGPMessage.new(payload)
emsg = self.pgp_list.pubkey.encrypt(pmsg)