~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/rest/tests/test_membership.py

  • Committer: Barry Warsaw
  • Date: 2011-09-02 00:54:37 UTC
  • mfrom: (7042.2.1 mailman_833123)
  • Revision ID: barry@list.org-20110902005437-bvjc5ptp3vlqkon9
* You can now query or change a member's `delivery_mode` attribute through
  the REST API (LP: #833132).  Given by Stephen A. Goss.

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
        else:
204
204
            raise AssertionError('Expected HTTPError')
205
205
 
206
 
    def test_patch_bogus_member_attribute_400(self):
 
206
    def test_patch_nonexistent_member(self):
 
207
        # /members/<missing> PATCH returns 404
 
208
        try:
 
209
            # For Python 2.6
 
210
            call_api('http://localhost:9001/3.0/members/801', method='PATCH')
 
211
        except HTTPError as exc:
 
212
            self.assertEqual(exc.code, 404)
 
213
        else:
 
214
            raise AssertionError('Expected HTTPError')
 
215
 
 
216
    def test_patch_member_bogus_attribute(self):
207
217
        # /members/<id> PATCH 'bogus' returns 400
208
218
        anne = self._usermanager.create_address('anne@example.com')
209
219
        self._mlist.subscribe(anne)