summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_systemconf.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-12-31 13:27:20 -0500
committerBarry Warsaw2016-12-31 13:27:20 -0500
commit286eac42626b5a2989d9d1142bff8e8911cf77c2 (patch)
tree843bbda5cd4643c6bf1b8d851ce6273b6eb4dc72 /src/mailman/rest/tests/test_systemconf.py
parent192d76f1330041336a1f5793646df36a932210f0 (diff)
downloadmailman-286eac42626b5a2989d9d1142bff8e8911cf77c2.tar.gz
mailman-286eac42626b5a2989d9d1142bff8e8911cf77c2.tar.zst
mailman-286eac42626b5a2989d9d1142bff8e8911cf77c2.zip
Diffstat (limited to 'src/mailman/rest/tests/test_systemconf.py')
-rw-r--r--src/mailman/rest/tests/test_systemconf.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mailman/rest/tests/test_systemconf.py b/src/mailman/rest/tests/test_systemconf.py
index 28fa315a9..9801badf0 100644
--- a/src/mailman/rest/tests/test_systemconf.py
+++ b/src/mailman/rest/tests/test_systemconf.py
@@ -39,10 +39,6 @@ class TestSystemConfiguration(unittest.TestCase):
self.assertEqual(json, dict(
cache_life='7d',
default_language='en',
- dmarc_org_domain_data= # noqa E251
- 'https://publicsuffix.org/list/public_suffix_list.dat',
- dmarc_resolver_lifetime='5s',
- dmarc_resolver_timeout='3s',
email_commands_max_lines='10',
filtered_messages_are_preservable='no',
html_to_plain_text_command='/usr/bin/lynx -dump $filename',
@@ -55,6 +51,20 @@ class TestSystemConfiguration(unittest.TestCase):
site_owner='noreply@example.com',
))
+ def test_dmarc_system_configuration(self):
+ # Test the [dmarc] section.
+ url = 'http://localhost:9001/3.0/system/configuration/dmarc'
+ json, response = call_api(url)
+ # There must be an `http_etag` key, but we don't care about its value.
+ self.assertIn('http_etag', json)
+ del json['http_etag']
+ self.assertEqual(json, dict(
+ org_domain_data_url= # noqa: E251
+ 'https://publicsuffix.org/list/public_suffix_list.dat',
+ resolver_lifetime='5s',
+ resolver_timeout='3s',
+ ))
+
def test_dotted_section(self):
# A dotted section works too.
url = 'http://localhost:9001/3.0/system/configuration/language.fr'
@@ -103,6 +113,7 @@ class TestSystemConfiguration(unittest.TestCase):
'database',
'devmode',
'digests',
+ 'dmarc',
'language.ar',
'language.ast',
'language.ca',