Opened 13 years ago

Last modified 12 years ago

#16916 closed Cleanup/optimization

Please document django.test.Client.defaults — at Version 1

Reported by: sailorfred@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Raúl Cumplido Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Aymeric Augustin)

The documentation makes it clear that I can provide an HTTP_USER_AGENT to the test client's methods, but it would have been nice to have it documented that the defaults exist, and how useful they are.

Change History (1)

comment:1 by Aymeric Augustin, 13 years ago

Description: modified (diff)
Summary: Please document django.test.Class.defaultsPlease document django.test.Client.defaults
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Defaults can also be passed in Client.__init__. Basically, these values just update the WSGI environ dictionary. There is no fixed list.

The values from the keywords argument to theget/post/etc. methods have precedence, then those passed in __init__, and then the defaults.

Indeed, this isn't documented.

Note: See TracTickets for help on using tickets.
Back to Top