diff options
| author | Barry Warsaw | 2014-12-26 18:32:30 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-12-26 18:32:30 -0500 |
| commit | ee2fdc578b5e0209a9e661cc1455aaff5dc8443a (patch) | |
| tree | 8187b97ef08764aab3bc642e56e6242d7f555354 /src/mailman/rest/tests/test_root.py | |
| parent | cfdc3d9f6a358b76135ea42dbd03f8ed782af9a9 (diff) | |
| download | mailman-ee2fdc578b5e0209a9e661cc1455aaff5dc8443a.tar.gz mailman-ee2fdc578b5e0209a9e661cc1455aaff5dc8443a.tar.zst mailman-ee2fdc578b5e0209a9e661cc1455aaff5dc8443a.zip | |
Diffstat (limited to 'src/mailman/rest/tests/test_root.py')
| -rw-r--r-- | src/mailman/rest/tests/test_root.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mailman/rest/tests/test_root.py b/src/mailman/rest/tests/test_root.py index 5c134159d..7f3535496 100644 --- a/src/mailman/rest/tests/test_root.py +++ b/src/mailman/rest/tests/test_root.py @@ -19,6 +19,7 @@ __all__ = [ 'TestRoot', + 'TestSystemConfiguration', ] @@ -39,9 +40,19 @@ from six.moves.urllib_error import HTTPError class TestRoot(unittest.TestCase): layer = RESTLayer - def test_root_system(self): - # You can get the system preferences via the root path. + def test_root_system_backward_compatibility(self): + # The deprecated path for getting system version information points + # you to the new URL. url = 'http://localhost:9001/3.0/system' + new = '{}/versions'.format(url) + json, response = call_api(url) + self.assertEqual(json['mailman_version'], system.mailman_version) + self.assertEqual(json['python_version'], system.python_version) + self.assertEqual(json['self_link'], new) + + def test_system_versions(self): + # System version information is available via REST. + url = 'http://localhost:9001/3.0/system/versions' json, response = call_api(url) self.assertEqual(json['mailman_version'], system.mailman_version) self.assertEqual(json['python_version'], system.python_version) @@ -119,3 +130,8 @@ class TestRoot(unittest.TestCase): self.assertEqual(content['title'], '401 Unauthorized') self.assertEqual(content['description'], 'User is not authorized for the REST API') + + + +class TestSystemConfiguration(unittest.TestCase): + layer = RESTLayer |
