~rashi007/mailman/docsfix

« back to all changes in this revision

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

  • Committer: Barry Warsaw
  • Date: 2015-02-13 08:13:06 UTC
  • Revision ID: barry@list.org-20150213081306-1b567rjfxqw45ti6
 * A new API is provided to support non-production testing infrastructures,
   allowing a client to cull all orphaned UIDs via ``DELETE`` on
   ``<api>/reserved/uids/orphans``.  Note that *no guarantees* of API
   stability will ever be made for resources under ``reserved``.
   (LP: #1420083)

Also:

- Allow @dbconnection methods to be @staticmethods taking only one argument,
  the store to perform the query on.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        self.assertEqual(content['title'], '401 Unauthorized')
124
124
        self.assertEqual(content['description'],
125
125
                         'User is not authorized for the REST API')
 
126
 
 
127
    def test_reserved_bad_subpath(self):
 
128
        # Only <api>/reserved/uids/orphans is a defined resource.  DELETEing
 
129
        # anything else gives a 404.
 
130
        with self.assertRaises(HTTPError) as cm:
 
131
            call_api('http://localhost:9001/3.0/reserved/uids/assigned',
 
132
                     method='DELETE')
 
133
        self.assertEqual(cm.exception.code, 404)