summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_root.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest/tests/test_root.py')
-rw-r--r--src/mailman/rest/tests/test_root.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mailman/rest/tests/test_root.py b/src/mailman/rest/tests/test_root.py
index 6d10fc635..905461e46 100644
--- a/src/mailman/rest/tests/test_root.py
+++ b/src/mailman/rest/tests/test_root.py
@@ -123,3 +123,11 @@ class TestRoot(unittest.TestCase):
self.assertEqual(content['title'], '401 Unauthorized')
self.assertEqual(content['description'],
'User is not authorized for the REST API')
+
+ def test_reserved_bad_subpath(self):
+ # Only <api>/reserved/uids/orphans is a defined resource. DELETEing
+ # anything else gives a 404.
+ with self.assertRaises(HTTPError) as cm:
+ call_api('http://localhost:9001/3.0/reserved/uids/assigned',
+ method='DELETE')
+ self.assertEqual(cm.exception.code, 404)