summaryrefslogtreecommitdiff
path: root/django/test/client.py
AgeCommit message (Collapse)Author
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-08-11Fixed #25163 -- Fixed exception handling in nested test client requests.pscottdevos
2015-07-01Fixed #20916 -- Added Client.force_login() to bypass authentication.Jon Dufresne
2015-05-25Fixed #24773 -- Added a json() method on test client responses.Andy McKay
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-08Fixed #23968 -- Replaced list comprehension with generators and dict ↵Jon Dufresne
comprehension
2014-12-04Fixed #23911 -- Added support for buffer file uploads in the test clientThomas Tanner
2014-11-25Fixed #23682 -- Enhanced circular redirects detection in tests.wrwrwr
When the test client detects a redirect to a URL seen in the currently followed chain it will now raise a RedirectCycleError instead of just returning the first repeated response. It will also complain when a single chain of redirects is longer than 20, as this often means a redirect loop with varying URLs, and even if it's not actually one, such long chains are likely to be treated as loops by browsers. Thanks Preston Timmons, Berker Peksag, and Tim Graham for reviews.
2014-10-28Fixed #23606 -- Implemented Client and RequestFactory trace() methods.Rigel Di Scala
Thanks KevinEtienne for the suggestion.
2014-10-21Fixed #21740 -- Allowed test client data to be an empty stringClaude Paroz
This fixes a regression introduced by 2a31d00933. Thanks tony-zhu for the report.
2014-10-16Fixed #19508 -- Implemented uri_to_iri as per RFC.Anubhav Joshi
Thanks Loic Bistuer for helping in shaping the patch and Claude Paroz for the review.
2014-08-29Fixed #21483 -- Added WSGI environ to kwargs sent to request_started signal.Joshua "jag" Ginsberg
2014-06-13Fixed #22771 -- Fixed test.Client.logout when using custom auth backend.Xavier Fernandez
2014-06-13Fixed #16087 -- Added ResolverMatch instance to test client response.Greg Chapple
Thanks mrmachine for the suggestion.
2014-05-22Fixed #21357 -- Fixed test client session initialization.Preston Timmons
The test client will now create a session when it is first accessed if no session already exists.
2014-04-28Revert "Fixed #15179 -- middlewares not applied for test client login()"Tim Graham
This reverts commit 4fdd51b73240bf9c8d9472fcc45df699f0714755. See the ticket for concerns with this implementation; it will be revisited.
2014-02-13Fixed a typo (I guess).Florian Apolloner
2014-01-21Refs #21831 -- Softened the TestClient dependency on contrib.auth.Russell Keith-Magee
This is to prevent an import of django.test causing an import (and thus an implicit checks regisration) for an app that may not be in `INSTALLED_APPS`. Better fixes may be possible when #20915 and/or #21829 are addressed. Thanks to @carljm for the report.
2014-01-16Fixed #21740 -- Stopped using mutable default arguments in test clientClaude Paroz
Thanks Denver Coneybeare for the report and initial patch, and Atala for another patch.
2014-01-09Fixed #12571 -- Attached originating WSGIRequest to test client responses.Unai Zalakain
Originating WSGIRequests are now attached to the ``wsgi_request`` attribute of the ``HttpResponse`` returned by the testing client. Thanks rvdrijst for the suggestion.
2014-01-06Fixed #21718 -- Renamed has_app to is_installed.Aymeric Augustin
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-22Stop testing for inclusion in INSTALLED_APPS.Aymeric Augustin
Removed some exception masking in the comments app that was harmful and couldn't be preserved easily.
2013-11-26Fixed #21448 -- Fixed test client logout with cookie-based sessionsClaude Paroz
Thanks Gunnar Scherf for the report and the suggested patch.
2013-11-19Fixed #15179 -- middlewares not applied for test client login()Unai Zalakain
Requests made with django.test.Client.login() and logout() respect defaults defined in django.test.Client instantiation and are processed through middleware. Thanks to Loic for the reviews.
2013-11-02Fixed flake8 E241Boryslav Larin
2013-11-02Fixed #21341 -- Eased https requests with the test clientUnai Zalakain
All request methods of ``django.test.client.Client`` receive a ``secure`` argument that defaults to ``False`` indicating whether or not to make the request through https. Thanks Aymeric Augustin for the review.
2013-09-22Removed a few trailing backslashes.Aymeric Augustin
We have always been at war with trailing backslashes.
2013-09-07Oops :(Aymeric Augustin
2013-09-07Fixed an encoding issue in the test client.Aymeric Augustin
Fixed comment_tests.tests.test_comment_view.CommentViewTests.testCommentPostRedirectWithInvalidIntegerPK. Refs #20530.
2013-09-06Fixed a number of flake8 errors -- particularly around unused imports and ↵Alex Gaynor
local variables
2013-09-05Took advantage of django.utils.six.moves.urllib.*.Aymeric Augustin
2013-08-13Fixed #20864 -- Made the test client use common method for performing requests.Krzysztof Jurewicz
2013-08-09Fixed #18356 -- Gave the test client signals.template_rendered call a unique ↵Bojan Mihelac
dispatch_uid This prevents the test client context from being lost when the client is used in a nested fashion.
2013-07-29Deprecated django.utils.importlibClaude Paroz
This was a shim for pre-Python 2.7 support.
2013-07-11Fixed #13721 -- Added UploadedFile.content_type_extra.Benjamin Kagia
Thanks Waldemar Kornewald and mvschaik for work on the patch.
2013-06-14Merge pull request #1270 from ↵Marc Tamlyn
tomchristie/remove-incorrect-content-type-test-client Remove incorrect CONTENT_TYPE header from GET and HEAD requests
2013-06-14Remove incorrect CONTENT_TYPE header from GET and HEAD requestsTom Christie
2013-06-04Fixed #18924 -- Made test.Client.logout send user_logged_out signal.Tim Graham
Thanks awsum for the suggestion and Pavel Ponomarev and Florian Hahn for the patch.
2013-02-28Implemented persistent database connections.Aymeric Augustin
Thanks Anssi Kääriäinen and Karen Tracey for their inputs.
2013-02-13Fixed #18558 -- Added url property to HttpResponseRedirect*Hiroki Kiyohara
Thanks coolRR for the report.
2013-02-02Fixed #17797 -- Enabled support for PATCH requests in the dummy test client. ↵Julien Phalip
Thanks to pfarmer for the suggestion and initial patch.
2013-01-01Fixed #19519 again -- Regression in LiveServerTestCase after fd1279a4.Aymeric Augustin
2012-12-31Fixed #19519 -- Fired request_finished in the WSGI iterable's close().Aymeric Augustin
2012-12-22Fixed #19468 -- Decoded request.path correctly on Python 3.Aymeric Augustin
Thanks aliva for the report and claudep for the feedback.
2012-12-22Fixed #19487 -- Used str in the test client's WSGI environ.Aymeric Augustin
This regression was introduced by the unicode_literals patch. The WSGI spec mandates that environ contains native strings.
2012-10-20Fixed #19094 -- Improved FakePayload to support write, len and string inputClaude Paroz
Thanks Ondrej Slinták for the suggestion.
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.