Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/test/client.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25424 -- Use force_str for test client URLs.Travis Jensen2015-09-191-1/+1
| | | | | | | | urlparse() fails with an AttributeError ("'__proxy__' object has no attribute 'decode'") if reverse_lazy is used to look up the URL (this is exactly the same problem that caused ticket #18776). The solution is to use force_str() on the path before handing it to urlparse().
* Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić2015-09-121-1/+4
|
* Fixed #25163 -- Fixed exception handling in nested test ↵pscottdevos2015-08-111-3/+3
| | | | client requests.
* Fixed #20916 -- Added Client.force_login() to bypass ↵Jon Dufresne2015-07-011-26/+35
| | | | authentication.
* Fixed #24773 -- Added a json() method on test client ↵Andy McKay2015-05-251-0/+8
| | | | responses.
* Removed unnecessary arguments in .get method callsPiotr Jakimiak2015-05-131-1/+1
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-9/+10
|
* Fixed #23968 -- Replaced list comprehension with ↵Jon Dufresne2014-12-081-4/+4
| | | | generators and dict comprehension
* Fixed #23911 -- Added support for buffer file uploads in ↵Thomas Tanner2014-12-041-3/+8
| | | | the test client
* Fixed #23682 -- Enhanced circular redirects detection in ↵wrwrwr2014-11-251-7/+24
| | | | | | | | | | | | | | | tests. 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.
* Fixed #23606 -- Implemented Client and RequestFactory ↵Rigel Di Scala2014-10-281-0/+13
| | | | | | trace() methods. Thanks KevinEtienne for the suggestion.
* Fixed #21740 -- Allowed test client data to be an empty ↵Claude Paroz2014-10-211-3/+6
| | | | | | | string This fixes a regression introduced by 2a31d00933. Thanks tony-zhu for the report.
* Fixed #19508 -- Implemented uri_to_iri as per RFC.Anubhav Joshi2014-10-151-8/+8
| | | | | Thanks Loic Bistuer for helping in shaping the patch and Claude Paroz for the review.
* Fixed #21483 -- Added WSGI environ to kwargs sent to ↵Joshua "jag" Ginsberg2014-08-291-1/+1
| | | | request_started signal.
* Fixed #22771 -- Fixed test.Client.logout when using ↵Xavier Fernandez2014-06-131-5/+2
| | | | custom auth backend.
* Fixed #16087 -- Added ResolverMatch instance to test ↵Greg Chapple2014-06-131-1/+6
| | | | | | client response. Thanks mrmachine for the suggestion.
* Fixed #21357 -- Fixed test client session initialization.Preston Timmons2014-05-231-0/+5
| | | | | The test client will now create a session when it is first accessed if no session already exists.
* Revert "Fixed #15179 -- middlewares not applied for test ↵Tim Graham2014-04-291-5/+4
| | | | | | | | client login()" This reverts commit 4fdd51b73240bf9c8d9472fcc45df699f0714755. See the ticket for concerns with this implementation; it will be revisited.
* Fixed a typo (I guess).Florian Apolloner2014-02-131-1/+1
|
* Refs #21831 -- Softened the TestClient dependency on ↵Russell Keith-Magee2014-01-211-1/+2
| | | | | | | | | | | | contrib.auth. 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.
* Fixed #21740 -- Stopped using mutable default arguments ↵Claude Paroz2014-01-161-9/+9
| | | | | | | in test client Thanks Denver Coneybeare for the report and initial patch, and Atala for another patch.
* Fixed #12571 -- Attached originating WSGIRequest to test ↵Unai Zalakain2014-01-101-7/+6
| | | | | | | | | client responses. Originating WSGIRequests are now attached to the ``wsgi_request`` attribute of the ``HttpResponse`` returned by the testing client. Thanks rvdrijst for the suggestion.
* Fixed #21718 -- Renamed has_app to is_installed.Aymeric Augustin2014-01-061-2/+2
|
* Renamed AppCache to Apps.Aymeric Augustin2013-12-241-3/+3
| | | | | | Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Stop testing for inclusion in INSTALLED_APPS.Aymeric Augustin2013-12-221-2/+3
| | | | | Removed some exception masking in the comments app that was harmful and couldn't be preserved easily.
* Fixed #21448 -- Fixed test client logout with ↵Claude Paroz2013-11-261-0/+1
| | | | | | cookie-based sessions Thanks Gunnar Scherf for the report and the suggested patch.
* Fixed #15179 -- middlewares not applied for test client ↵Unai Zalakain2013-11-191-6/+16
| | | | | | | | | | login() 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.
* Fixed flake8 E241Boryslav Larin2013-11-021-17/+17
|
* Fixed #21341 -- Eased https requests with the test clientUnai Zalakain2013-11-021-32/+50
| | | | | | | 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.
* Removed a few trailing backslashes.Aymeric Augustin2013-09-221-2/+2
| | | | We have always been at war with trailing backslashes.
* Oops :(Aymeric Augustin2013-09-071-1/+1
|
* Fixed an encoding issue in the test client.Aymeric Augustin2013-09-071-1/+5
| | | | | | | Fixed comment_tests.tests.test_comment_view.CommentViewTests.testCommentPostRedirectWithInvalidIntegerPK. Refs #20530.
* Fixed a number of flake8 errors -- particularly around ↵Alex Gaynor2013-09-071-2/+0
| | | | unused imports and local variables
* Took advantage of django.utils.six.moves.urllib.*.Aymeric Augustin2013-09-051-5/+1
|
* Fixed #20864 -- Made the test client use common method ↵Krzysztof Jurewicz2013-08-141-37/+26
| | | | for performing requests.
* Fixed #18356 -- Gave the test client ↵Bojan Mihelac2013-08-091-2/+3
| | | | | | | signals.template_rendered call a unique dispatch_uid This prevents the test client context from being lost when the client is used in a nested fashion.
* Deprecated django.utils.importlibClaude Paroz2013-07-291-1/+1
| | | | This was a shim for pre-Python 2.7 support.
* Fixed #13721 -- Added UploadedFile.content_type_extra.Benjamin Kagia2013-07-111-1/+5
| | | | Thanks Waldemar Kornewald and mvschaik for work on the patch.
* Merge pull request #1270 from ↵Marc Tamlyn2013-06-141-2/+0
|\ | | | | | | | | tomchristie/remove-incorrect-content-type-test-client Remove incorrect CONTENT_TYPE header from GET and HEAD requests
| * Remove incorrect CONTENT_TYPE header from GET and HEAD ↵Tom Christie2013-06-141-2/+0
| | | | | | | | requests
* | Fixed #18924 -- Made test.Client.logout send ↵Tim Graham2013-06-041-6/+12
|/ | | | | | | user_logged_out signal. Thanks awsum for the suggestion and Pavel Ponomarev and Florian Hahn for the patch.
* Implemented persistent database connections.Aymeric Augustin2013-02-281-5/+7
| | | | Thanks Anssi Kääriäinen and Karen Tracey for their inputs.
* Fixed #18558 -- Added url property to HttpResponseRedirect*Hiroki Kiyohara2013-02-131-1/+1
| | | | Thanks coolRR for the report.
* Fixed #17797 -- Enabled support for PATCH requests in ↵Julien Phalip2013-02-031-0/+16
| | | | the dummy test client. Thanks to pfarmer for the suggestion and initial patch.
* Fixed #19519 again -- Regression in LiveServerTestCase ↵Aymeric Augustin2013-01-011-5/+10
| | | | after fd1279a4.
* Fixed #19519 -- Fired request_finished in the WSGI ↵Aymeric Augustin2012-12-311-13/+22
| | | | iterable's close().
* Fixed #19468 -- Decoded request.path correctly on Python 3.Aymeric Augustin2012-12-221-1/+5
| | | | Thanks aliva for the report and claudep for the feedback.
* Fixed #19487 -- Used str in the test client's WSGI environ.Aymeric Augustin2012-12-221-23/+23
| | | | | This regression was introduced by the unicode_literals patch. The WSGI spec mandates that environ contains native strings.
* Fixed #19094 -- Improved FakePayload to support write, ↵Claude Paroz2012-10-201-3/+19
| | | | | | len and string input Thanks Ondrej Slinták for the suggestion.