~barry/mailman/lp1423756

« back to all changes in this revision

Viewing changes to src/mailman/rest/docs/users.rst

  • Committer: Barry Warsaw
  • Date: 2015-01-05 01:20:33 UTC
  • mfrom: (7264.4.66 py3)
  • Revision ID: barry@list.org-20150105012033-zdrw9c2odhpf22fz
Merge the Python 3 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
    server: ...
278
278
    status: 204
279
279
 
280
 
Cris's resource cannot be retrieved either by email address...
281
 
 
282
 
    >>> dump_json('http://localhost:9001/3.0/users/cris@example.com')
283
 
    Traceback (most recent call last):
284
 
    ...
285
 
    HTTPError: HTTP Error 404: 404 Not Found
286
 
 
287
 
...or user id.
288
 
 
289
 
    >>> dump_json('http://localhost:9001/3.0/users/3')
290
 
    Traceback (most recent call last):
291
 
    ...
292
 
    HTTPError: HTTP Error 404: 404 Not Found
293
 
 
294
 
Cris's address records no longer exist either.
295
 
 
296
 
    >>> dump_json('http://localhost:9001/3.0/addresses/cris@example.com')
297
 
    Traceback (most recent call last):
298
 
    ...
299
 
    HTTPError: HTTP Error 404: 404 Not Found
300
 
 
301
280
 
302
281
User addresses
303
282
==============
420
399
    date: ...
421
400
    server: ...
422
401
    status: 204
423
 
 
424
 
But this time, she is unsuccessful.
425
 
 
426
 
    >>> dump_json('http://localhost:9001/3.0/users/5/login', {
427
 
    ...           'cleartext_password': 'not-the-password',
428
 
    ...           }, method='POST')
429
 
    Traceback (most recent call last):
430
 
    ...
431
 
    HTTPError: HTTP Error 403: 403 Forbidden