summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_membership.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest/tests/test_membership.py')
-rw-r--r--src/mailman/rest/tests/test_membership.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mailman/rest/tests/test_membership.py b/src/mailman/rest/tests/test_membership.py
index db1c2e4d2..8a315e359 100644
--- a/src/mailman/rest/tests/test_membership.py
+++ b/src/mailman/rest/tests/test_membership.py
@@ -203,6 +203,22 @@ class TestMembership(unittest.TestCase):
else:
raise AssertionError('Expected HTTPError')
+ def test_patch_bogus_member_attribute_400(self):
+ # /members/<id> PATCH 'bogus' returns 400
+ anne = self._usermanager.create_address('anne@example.com')
+ self._mlist.subscribe(anne)
+ config.db.commit()
+ try:
+ # For Python 2.6
+ call_api('http://localhost:9001/3.0/members/1', {
+ 'powers': 'super',
+ }, method='PATCH')
+ except HTTPError as exc:
+ self.assertEqual(exc.code, 400)
+ self.assertEqual(exc.msg, 'Unexpected parameters: powers')
+ else:
+ raise AssertionError('Expected HTTPError')
+
def test_suite():