Ticket #15179: requestfactory_for_login.diff
File requestfactory_for_login.diff, 602 bytes (added by , 14 years ago) |
---|
-
django/test/client.py
diff --git a/django/test/client.py b/django/test/client.py index 24fe627..068f566 100644
a b class Client(RequestFactory): 504 504 engine = import_module(settings.SESSION_ENGINE) 505 505 506 506 # Create a fake request to store login details. 507 request = HttpRequest() 507 # Notice that we cannot use super get since it returns response 508 request = RequestFactory(**self.defaults).post("/login/") 508 509 if self.session: 509 510 request.session = self.session 510 511 else: