summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_bans.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest/tests/test_bans.py')
-rw-r--r--src/mailman/rest/tests/test_bans.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mailman/rest/tests/test_bans.py b/src/mailman/rest/tests/test_bans.py
index fc096fa1b..b83bf8aef 100644
--- a/src/mailman/rest/tests/test_bans.py
+++ b/src/mailman/rest/tests/test_bans.py
@@ -81,3 +81,8 @@ class TestBans(unittest.TestCase):
self.assertEqual(cm.exception.code, 404)
self.assertEqual(cm.exception.reason,
b'Email is not banned: banned@example.com')
+
+ def test_ban_missing_mailing_list(self):
+ with self.assertRaises(HTTPError) as cm:
+ call_api('http://localhost:9001/3.0/lists/bee.example.com/bans')
+ self.assertEqual(cm.exception.code, 404)