#31776: Django test client uses incomplete request for _login
---------------------------------------------+------------------------
               Reporter:  Tiemo              |          Owner:  nobody
                   Type:  Bug                |         Status:  new
              Component:  Testing framework  |        Version:  3.0
               Severity:  Normal             |       Keywords:
           Triage Stage:  Unreviewed         |      Has patch:  0
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  1
                  UI/UX:  0                  |
---------------------------------------------+------------------------
 The test client (django.test.client.Client) uses an empty request when
 calling login. This is a little annoying when you have a
 user_logged_(in|out) signal handler that attempts to retrieve the
 request's IP for logging purposes.

 The offending line [1] creates an empty HttpRequest. Perhaps it could use
 RequestFactory.request instead?

 [1]:
 https://github.com/django/django/blob/master/django/test/client.py#L615

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31776>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.a7207196765142f0df278d0cd54db025%40djangoproject.com.

Reply via email to