summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests
diff options
context:
space:
mode:
authorAurélien Bompard2016-01-18 18:25:03 +0100
committerAurélien Bompard2016-08-18 10:28:26 +0200
commita8f2fc64c683420f40bac1b4c5d551305a0e0ecc (patch)
tree316b471bd753b7382468b56336995ec7ae0d6888 /src/mailman/rest/tests
parent783603ed668e9e50b1b798579fbfa7b6ff49f98c (diff)
downloadmailman-a8f2fc64c683420f40bac1b4c5d551305a0e0ecc.tar.gz
mailman-a8f2fc64c683420f40bac1b4c5d551305a0e0ecc.tar.zst
mailman-a8f2fc64c683420f40bac1b4c5d551305a0e0ecc.zip
Don't show the disabled archivers in the REST API
Because one can't add a configuration overlay to the running REST server in testing mode, the prototype archiver was disabled in the testing configuration. This is where most of the changes in this commit come from.
Diffstat (limited to 'src/mailman/rest/tests')
-rw-r--r--src/mailman/rest/tests/test_lists.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mailman/rest/tests/test_lists.py b/src/mailman/rest/tests/test_lists.py
index 787009855..d83f70058 100644
--- a/src/mailman/rest/tests/test_lists.py
+++ b/src/mailman/rest/tests/test_lists.py
@@ -32,7 +32,7 @@ from mailman.interfaces.usermanager import IUserManager
from mailman.model.mailinglist import AcceptableAlias
from mailman.runners.digest import DigestRunner
from mailman.testing.helpers import (
- call_api, get_queue_messages, make_testable_runner,
+ call_api, configuration, get_queue_messages, make_testable_runner,
specialized_message_from_string as mfs)
from mailman.testing.layers import RESTLayer
from mailman.utilities.datetime import now as right_now
@@ -339,7 +339,6 @@ class TestListArchivers(unittest.TestCase):
self.assertEqual(resource, {
'mail-archive': True,
'mhonarc': True,
- 'prototype': True,
})
def test_archiver_statuses_on_missing_lists(self):
@@ -375,7 +374,7 @@ class TestListArchivers(unittest.TestCase):
def test_put_incomplete_statuses(self):
# PUT requires the full resource representation. This one forgets to
- # specify the prototype and mhonarc archiver.
+ # specify the mhonarc archiver.
with self.assertRaises(HTTPError) as cm:
call_api(
'http://localhost:9001/3.0/lists/ant.example.com/archivers', {
@@ -384,7 +383,7 @@ class TestListArchivers(unittest.TestCase):
method='PUT')
self.assertEqual(cm.exception.code, 400)
self.assertEqual(cm.exception.reason,
- b'Missing parameters: mhonarc, prototype')
+ b'Missing parameters: mhonarc')
def test_patch_bogus_status(self):
# Archiver statuses must be interpretable as booleans.
@@ -392,8 +391,7 @@ class TestListArchivers(unittest.TestCase):
call_api(
'http://localhost:9001/3.0/lists/ant.example.com/archivers', {
'mail-archive': 'sure',
- 'mhonarc': False,
- 'prototype': 'no'
+ 'mhonarc': 'no'
},
method='PATCH')
self.assertEqual(cm.exception.code, 400)