summaryrefslogtreecommitdiff
path: root/tests/test_client_regress/views.py
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-05-11Refs #30116 -- Simplified regex match group access with Match.__getitem__().Jon Dufresne
The method has been available since Python 3.6. The shorter syntax is also marginally faster.
2019-10-18Fixed #28337 -- Preserved extra headers of requests made with ↵Patrick Jenkins
django.test.Client in assertRedirects(). Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2019-06-07Fixed #30550 -- Fixed decoding of non-UTF-8 bytes objects in response.json().Jon Dufresne
2019-04-24Removed unnecessary assignments in various code.Jon Dufresne
2019-02-09Removed default empty content argument from HttpResponse calls.Jon Dufresne
2017-03-09Decoupled test client encoding tests from JSON handlingClaude Paroz
Using JSON as non-UTF-8 content is controversial, and the RFC 7159 discourages it. Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2016-12-29Fixed #27622 -- Allowed test client to accept vendor tree JSON content types.Anton Samarchyan
2016-11-14Decorated a few functions.Tim Graham
2016-08-04Fixed #27012 -- Removed unnecessary setup_test_environment() in a test.Chris Jerdonek
2015-12-23Refs #25969 -- Replaced usage of render_to_response() with render() in tests.Tim Graham
2015-09-23Removed dictionary and context_instance parameters for render functions.Tim Graham
Per deprecation timeline.
2015-07-31Fixed #24720 -- Avoided resolving URLs that don't end in a slash twice in ↵Jay Cox
CommonMiddleware. This speeds up affected requests by about 5%.
2015-05-25Fixed #24773 -- Added a json() method on test client responses.Andy McKay
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-17Removed request.REQUEST per deprecation timeline; refs #18659.Tim Graham
2014-12-30Applied ignore_warnings to Django testsClaude Paroz
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-04-14Fixed #22369 -- Added count parameter to assertTemplateUsedJacob R. Rothenbuhler
2014-01-14Fixed #21774 -- Isolate all test urls from eachother.Marc Tamlyn
This (nearly) completes the work to isolate all the test modules from each other. This is now more important as importing models from another module will case PendingDeprecationWarnings if those modules are not in INSTALLED_APPS. The only remaining obvious dependencies are: - d.c.auth depends on d.c.admin (because of the is_admin flag to some views), but this is not so important and d.c.admin is in always_installed_apps - test_client_regress depends on test_client. Eventually these should become a single module, as the split serves no useful purpose.
2013-11-02Fixing E302 ErrorsJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-26Fix all violators of E231Alex Gaynor
2013-10-19Removed unused local variables in tests.Tim Graham
2013-10-17Fixed #18659 -- Deprecated request.REQUEST and MergeDictBouke Haarsma
Thanks Aymeric Augustin for the suggestion.
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-05-25Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation.Preston Holmes
SuspiciousOperations have been differentiated into subclasses, and are now logged to a 'django.security.*' logger. SuspiciousOperations that reach django.core.handlers.base.BaseHandler will now return a 400 instead of a 500. Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft for review.
2013-04-11Fixed #20237 -- Reenabled assertContains with binary parameterClaude Paroz
Thanks Baptiste Mispelon for the review.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner