diff options
| author | Barry Warsaw | 2016-04-03 01:04:42 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2016-04-03 01:04:42 -0400 |
| commit | f9831ac35ceb1d6f1b2b2c3c939912c391e13083 (patch) | |
| tree | 9118d1d3b4f70c8232a5a857c597c432e4085e36 /src | |
| parent | b19e2d156e29665d3b3f5ef3d2450a239d2cc9ac (diff) | |
| download | mailman-f9831ac35ceb1d6f1b2b2c3c939912c391e13083.tar.gz mailman-f9831ac35ceb1d6f1b2b2c3c939912c391e13083.tar.zst mailman-f9831ac35ceb1d6f1b2b2c3c939912c391e13083.zip | |
Fix some tests.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/rest/tests/test_root.py | 4 | ||||
| -rw-r--r-- | src/mailman/rest/wsgiapp.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mailman/rest/tests/test_root.py b/src/mailman/rest/tests/test_root.py index dc3acce20..1e0ff6f28 100644 --- a/src/mailman/rest/tests/test_root.py +++ b/src/mailman/rest/tests/test_root.py @@ -100,7 +100,7 @@ class TestRoot(unittest.TestCase): content = json.loads(raw_content.decode('utf-8')) self.assertEqual(content['title'], '401 Unauthorized') self.assertEqual(content['description'], - 'The REST API requires authentication') + 'REST API authorization failed') def test_unauthorized(self): # Bad Basic Auth credentials results in a 401 error. @@ -116,7 +116,7 @@ class TestRoot(unittest.TestCase): content = json.loads(raw_content.decode('utf-8')) self.assertEqual(content['title'], '401 Unauthorized') self.assertEqual(content['description'], - 'User is not authorized for the REST API') + 'REST API authorization failed') def test_reserved_bad_subpath(self): # Only <api>/reserved/uids/orphans is a defined resource. DELETEing diff --git a/src/mailman/rest/wsgiapp.py b/src/mailman/rest/wsgiapp.py index a79abf76c..67f920205 100644 --- a/src/mailman/rest/wsgiapp.py +++ b/src/mailman/rest/wsgiapp.py @@ -101,7 +101,7 @@ class Middleware: # Not authorized. raise HTTPUnauthorized( '401 Unauthorized', - 'User is not authorized for the REST API', + 'REST API authorization failed', challenges=['Basic realm=Mailman3']) |
