diff options
| author | J08nY | 2017-06-04 17:41:29 +0200 |
|---|---|---|
| committer | J08nY | 2017-08-07 18:03:42 +0200 |
| commit | e65f5e7bbb34063e252ffecd13fc349c5cb69a24 (patch) | |
| tree | b7cb079e8b0bd6c7f5312a38c59d22da68a7eae5 /src/mailman/rest/tests/test_lists.py | |
| parent | 324226f1f859f6be5e932dc9abe638aba268d154 (diff) | |
| download | mailman-e65f5e7bbb34063e252ffecd13fc349c5cb69a24.tar.gz mailman-e65f5e7bbb34063e252ffecd13fc349c5cb69a24.tar.zst mailman-e65f5e7bbb34063e252ffecd13fc349c5cb69a24.zip | |
Diffstat (limited to 'src/mailman/rest/tests/test_lists.py')
| -rw-r--r-- | src/mailman/rest/tests/test_lists.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mailman/rest/tests/test_lists.py b/src/mailman/rest/tests/test_lists.py index 0f3b99393..44446b289 100644 --- a/src/mailman/rest/tests/test_lists.py +++ b/src/mailman/rest/tests/test_lists.py @@ -347,6 +347,27 @@ class TestLists(unittest.TestCase): self.assertEqual(cm.exception.reason, 'Missing parameters: emails') +class TestListStyles(unittest.TestCase): + """Test /lists/styles.""" + + layer = RESTLayer + + def test_styles(self): + json, response = call_api('http://localhost:9001/3.0/lists/styles') + self.assertEqual(response.status_code, 200) + # Remove the variable data. + json.pop('http_etag') + self.assertEqual(json, { + 'styles': [ + {'name': 'legacy-announce', + 'description': 'Announce only mailing list style.'}, + {'name': 'legacy-default', + 'description': 'Ordinary discussion mailing list style.'} + ], + 'default': 'legacy-default' + }) + + class TestListArchivers(unittest.TestCase): """Test corner cases for list archivers.""" |
