diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/rest/root.py | 4 | ||||
| -rw-r--r-- | src/mailman/rest/tests/test_root.py | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py index bc5bace08..366dc3d08 100644 --- a/src/mailman/rest/root.py +++ b/src/mailman/rest/root.py @@ -132,14 +132,14 @@ class SystemConfiguration: @public class Pipelines: def on_get(self, request, response): - resource = dict(pipelines=list(config.pipelines.keys())) + resource = dict(pipelines=sorted(config.pipelines)) okay(response, etag(resource)) @public class Chains: def on_get(self, request, response): - resource = dict(chains=list(config.chains.keys())) + resource = dict(chains=sorted(config.chains)) okay(response, etag(resource)) diff --git a/src/mailman/rest/tests/test_root.py b/src/mailman/rest/tests/test_root.py index 26041b9e6..164f27f91 100644 --- a/src/mailman/rest/tests/test_root.py +++ b/src/mailman/rest/tests/test_root.py @@ -64,7 +64,8 @@ class TestRoot(unittest.TestCase): self.assertEqual(cm.exception.code, 404) def test_system_pipelines_are_exposed(self): - call_api('http://localhost:9001/3.0/system/pipelines') + json, response = call_api('http://localhost:9001/3.0/system/pipelines') + self.assertEqual(json['pipelines'], sorted(config.pipelines)) def test_system_pipelines_are_read_only(self): with self.assertRaises(HTTPError) as cm: @@ -79,7 +80,8 @@ class TestRoot(unittest.TestCase): self.assertEqual(cm.exception.code, 405) def test_system_chains_are_exposed(self): - call_api('http://localhost:9001/3.0/system/chains') + json, response = call_api('http://localhost:9001/3.0/system/chains') + self.assertEqual(json['chains'], sorted(config.chains)) def test_system_chains_are_read_only(self): with self.assertRaises(HTTPError) as cm: |
