#16916: Please document django.test.Client.defaults
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  sailorfred@…                       |         Status:  new
                   Type:             |      Component:  Documentation
  Cleanup/optimization               |       Severity:  Normal
              Milestone:             |       Keywords:
                Version:  1.3        |      Has patch:  0
             Resolution:             |    Needs tests:  0
           Triage Stage:  Accepted   |  Easy pickings:  1
    Needs documentation:  0          |
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Old description:

> 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.

New description:

 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.

--

Comment:

 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 the`get`/`post`/etc. methods have
 precedence, then those passed in `__init__`, and then the defaults.

 Indeed, this isn't documented.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16916#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to