summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mailman/rest/tests/test_root.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mailman/rest/tests/test_root.py b/src/mailman/rest/tests/test_root.py
index ea2f2da5e..26041b9e6 100644
--- a/src/mailman/rest/tests/test_root.py
+++ b/src/mailman/rest/tests/test_root.py
@@ -63,6 +63,36 @@ class TestRoot(unittest.TestCase):
call_api('http://localhost:9001/3.0/system/foo')
self.assertEqual(cm.exception.code, 404)
+ def test_system_pipelines_are_exposed(self):
+ call_api('http://localhost:9001/3.0/system/pipelines')
+
+ def test_system_pipelines_are_read_only(self):
+ with self.assertRaises(HTTPError) as cm:
+ call_api('http://localhost:9001/3.0/system/pipelines', {
+ 'pipelines': ['pipeline_1', 'pipeline_2']
+ }, method='PATCH')
+ self.assertEqual(cm.exception.code, 405)
+ with self.assertRaises(HTTPError) as cm:
+ call_api('http://localhost:9001/3.0/system/pipelines', {
+ 'pipelines': ['pipeline_1', 'pipeline_2']
+ }, method='PUT')
+ self.assertEqual(cm.exception.code, 405)
+
+ def test_system_chains_are_exposed(self):
+ call_api('http://localhost:9001/3.0/system/chains')
+
+ def test_system_chains_are_read_only(self):
+ with self.assertRaises(HTTPError) as cm:
+ call_api('http://localhost:9001/3.0/system/chains', {
+ 'chains': ['chain_1', 'chain_2']
+ }, method='PATCH')
+ self.assertEqual(cm.exception.code, 405)
+ with self.assertRaises(HTTPError) as cm:
+ call_api('http://localhost:9001/3.0/system/chains', {
+ 'chains': ['chain_1', 'chain_2']
+ }, method='PUT')
+ self.assertEqual(cm.exception.code, 405)
+
def test_system_preferences_are_read_only(self):
# /system/preferences are read-only.
with self.assertRaises(HTTPError) as cm: