summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Hanna2016-04-02 02:50:25 +0200
committerSimon Hanna2016-04-02 02:50:25 +0200
commitfc75d403ebcab3a7a3a8d9f838044cd885649907 (patch)
treee805f3383a4f1dcd3d3d3d67c55f250e4737d52c /src
parentc519cd8740bb3ce06ab58618bbb2e1a3d2870946 (diff)
downloadmailman-fc75d403ebcab3a7a3a8d9f838044cd885649907.tar.gz
mailman-fc75d403ebcab3a7a3a8d9f838044cd885649907.tar.zst
mailman-fc75d403ebcab3a7a3a8d9f838044cd885649907.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman/rest/root.py4
-rw-r--r--src/mailman/rest/tests/test_root.py6
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: