diff options
| author | Aurélien Bompard | 2016-08-30 14:53:32 +0200 |
|---|---|---|
| committer | Aurélien Bompard | 2016-08-30 15:11:53 +0200 |
| commit | 6a83017b03c679ed1f0f3b7cb0e0e8f50116a179 (patch) | |
| tree | 84b8750ed29d555233d7c70e00b23a14505e783d | |
| parent | 1c10a3ffa238082ffa3dac41c5edd2cde3984b6f (diff) | |
| download | mailman-6a83017b03c679ed1f0f3b7cb0e0e8f50116a179.tar.gz mailman-6a83017b03c679ed1f0f3b7cb0e0e8f50116a179.tar.zst mailman-6a83017b03c679ed1f0f3b7cb0e0e8f50116a179.zip | |
| -rw-r--r-- | src/mailman/rest/docs/listconf.rst | 2 | ||||
| -rw-r--r-- | src/mailman/rest/listconf.py | 1 | ||||
| -rw-r--r-- | src/mailman/rest/tests/test_listconf.py | 16 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/mailman/rest/docs/listconf.rst b/src/mailman/rest/docs/listconf.rst index 922da5ea4..3434f2a3d 100644 --- a/src/mailman/rest/docs/listconf.rst +++ b/src/mailman/rest/docs/listconf.rst @@ -52,6 +52,7 @@ All readable attributes for a list are available on a sub-resource. header_uri: http_etag: "..." include_rfc2369_headers: True + info: join_address: ant-join@example.com last_post_at: None leave_address: ant-leave@example.com @@ -103,6 +104,7 @@ When using ``PUT``, all writable attributes must be included. ... display_name='Fnords', ... description='This is my mailing list', ... include_rfc2369_headers=False, + ... info='This is the mailing list information', ... allow_list_posts=False, ... digest_send_periodic=False, ... digest_size_threshold=10.5, diff --git a/src/mailman/rest/listconf.py b/src/mailman/rest/listconf.py index ad8aefcbb..861e54dd1 100644 --- a/src/mailman/rest/listconf.py +++ b/src/mailman/rest/listconf.py @@ -155,6 +155,7 @@ ATTRIBUTES = dict( mail_host=GetterSetter(None), allow_list_posts=GetterSetter(as_boolean), include_rfc2369_headers=GetterSetter(as_boolean), + info=GetterSetter(str), join_address=GetterSetter(None), last_post_at=GetterSetter(None), leave_address=GetterSetter(None), diff --git a/src/mailman/rest/tests/test_listconf.py b/src/mailman/rest/tests/test_listconf.py index b454337e4..78e94b95e 100644 --- a/src/mailman/rest/tests/test_listconf.py +++ b/src/mailman/rest/tests/test_listconf.py @@ -66,6 +66,7 @@ RESOURCE = dict( first_strip_reply_to=True, goodbye_message_uri='mailman:///goodbye.txt', include_rfc2369_headers=False, + info='This is the mailing list info', moderator_password='password', posting_pipeline='virgin', reply_goes_to_list='point_to_list', @@ -449,3 +450,18 @@ class TestConfiguration(unittest.TestCase): self.assertEqual(cm.exception.code, 400) self.assertEqual(cm.exception.reason, b'Cannot convert parameters: description') + + def test_patch_info(self): + with transaction(): + resource, response = call_api( + 'http://localhost:9001/3.0/lists/ant.example.com/config', + dict(info='testvalue'), + 'PATCH') + self.assertEqual(self._mlist.info, 'testvalue') + # Now empty it + with transaction(): + resource, response = call_api( + 'http://localhost:9001/3.0/lists/ant.example.com/config', + dict(info=''), + 'PATCH') + self.assertEqual(self._mlist.info, '') |
