diff options
| author | J08nY | 2017-06-04 17:41:29 +0200 |
|---|---|---|
| committer | J08nY | 2017-08-30 14:28:28 +0200 |
| commit | 103fa8caf88f64d18b95ecc36af5ac53152c4269 (patch) | |
| tree | f949fe52569816956da68e97d459d187b491eace /src/mailman/rest/tests | |
| parent | 057bc0704ab6d975e327c11cac204decfb478c4d (diff) | |
| download | mailman-list-style-descriptions.tar.gz mailman-list-style-descriptions.tar.zst mailman-list-style-descriptions.zip | |
Diffstat (limited to 'src/mailman/rest/tests')
| -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.""" |
