diff options
| author | Barry Warsaw | 2015-02-13 03:13:06 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2015-02-13 03:13:06 -0500 |
| commit | 6d2c66ce133cd2c119fcb462dff662621013631a (patch) | |
| tree | 8ce6043cc9e95fc9bcb5ba5dab720e8b73a8c56b /src/mailman/rest/tests/test_root.py | |
| parent | 7ffb6d2d43471486997c78c3cffa787a10560ecf (diff) | |
| download | mailman-6d2c66ce133cd2c119fcb462dff662621013631a.tar.gz mailman-6d2c66ce133cd2c119fcb462dff662621013631a.tar.zst mailman-6d2c66ce133cd2c119fcb462dff662621013631a.zip | |
* A new API is provided to support non-production testing infrastructures,
allowing a client to cull all orphaned UIDs via ``DELETE`` on
``<api>/reserved/uids/orphans``. Note that *no guarantees* of API
stability will ever be made for resources under ``reserved``.
(LP: #1420083)
Also:
- Allow @dbconnection methods to be @staticmethods taking only one argument,
the store to perform the query on.
Diffstat (limited to 'src/mailman/rest/tests/test_root.py')
| -rw-r--r-- | src/mailman/rest/tests/test_root.py | 8 |
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) |
