summaryrefslogtreecommitdiff
path: root/src/mailman/model/tests/test_pending.py
diff options
context:
space:
mode:
authorAurélien Bompard2015-12-16 11:29:27 +0100
committerBarry Warsaw2015-12-16 11:17:30 -0500
commit1f6f1428fa01ea7d3499e3e1234fcd2241295675 (patch)
tree2d944f06b2ed4641dcd73296d486db87d18a785b /src/mailman/model/tests/test_pending.py
parent564ee293884d794abb8a16995654c1be429db3ce (diff)
downloadmailman-1f6f1428fa01ea7d3499e3e1234fcd2241295675.tar.gz
mailman-1f6f1428fa01ea7d3499e3e1234fcd2241295675.tar.zst
mailman-1f6f1428fa01ea7d3499e3e1234fcd2241295675.zip
Implement suggestions from the review
Diffstat (limited to '')
-rw-r--r--src/mailman/model/tests/test_pending.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mailman/model/tests/test_pending.py b/src/mailman/model/tests/test_pending.py
index 723d27be0..3fe381cf1 100644
--- a/src/mailman/model/tests/test_pending.py
+++ b/src/mailman/model/tests/test_pending.py
@@ -81,12 +81,12 @@ class TestPendings(unittest.TestCase):
token_4 = pendingdb.add(subscription_4)
self.assertEqual(pendingdb.count, 4)
# Find the pending subscription in list1.
- pendings = list(pendingdb.find(mlist=mlist, type='subscription'))
+ pendings = list(pendingdb.find(mlist=mlist, pend_type='subscription'))
self.assertEqual(len(pendings), 1)
self.assertEqual(pendings[0][0], token_1)
self.assertEqual(pendings[0][1]['list_id'], 'list1.example.com')
# Find all pending hold requests.
- pendings = list(pendingdb.find(type='hold request'))
+ pendings = list(pendingdb.find(pend_type='hold request'))
self.assertEqual(len(pendings), 2)
self.assertSetEqual(
set((p[0], p[1]['list_id']) for p in pendings),
@@ -96,6 +96,7 @@ class TestPendings(unittest.TestCase):
pendings = list(pendingdb.find(mlist=mlist))
self.assertEqual(len(pendings), 2)
self.assertSetEqual(
- set((p[0], p[1]['list_id']) for p in pendings),
- {(token_1, 'list1.example.com'), (token_3, 'list1.example.com')}
+ set((p[0], p[1]['list_id'], p[1]['type']) for p in pendings),
+ {(token_1, 'list1.example.com', 'subscription'),
+ (token_3, 'list1.example.com', 'hold request')}
)