summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_listconf.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest/tests/test_listconf.py')
-rw-r--r--src/mailman/rest/tests/test_listconf.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mailman/rest/tests/test_listconf.py b/src/mailman/rest/tests/test_listconf.py
index 9bc3486be..54918282f 100644
--- a/src/mailman/rest/tests/test_listconf.py
+++ b/src/mailman/rest/tests/test_listconf.py
@@ -437,3 +437,15 @@ class TestConfiguration(unittest.TestCase):
dict(advertised=True),
'PATCH')
self.assertTrue(self._mlist.advertised)
+
+ def test_patch_bad_description_value(self):
+ # GL issue #273
+ with self.assertRaises(HTTPError) as cm:
+ call_api(
+ 'http://localhost:9001/3.0/lists/ant.example.com/config'
+ '/description',
+ dict(description='This\ncontains\nnewlines.'),
+ 'PATCH')
+ self.assertEqual(cm.exception.code, 400)
+ self.assertEqual(cm.exception.reason,
+ b'Cannot convert parameters: description')