summaryrefslogtreecommitdiff
path: root/tests/regressiontests/test_client_regress/models.py
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2012-05-31Moved test_client_regress tests from models.py to tests.pyClaude Paroz
2012-05-25Fixed #17371 -- Made the test client more flexibleAymeric Augustin
The OPTIONS, PUT and DELETE methods no longer apply arbitrary data encoding (in the query string or in the request body).
2012-05-19Marked bytestrings with b prefix. Refs #18269Claude Paroz
This is a preparation for unicode literals general usage in Django (Python 3 compatibility).
2012-05-03Replaced deprecated TestCase methods. Refs #17049.Claude Paroz
2012-04-30Ensured tests pass using custom PASSWORD_HASHERS.Anssi Kääriäinen
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-03-31Removed deprecated tests missed in r17839.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-15Reverted r16386 because it replaced a brittle method with another not lessRamiro Morales
arbitrary method when the test client checks for the presence of the bundled session backends+session middleware combination. We will revisit the issue soon, probably to make these checks even less strict. Refs #7836, #16605 git-svn-id: http://code.djangoproject.com/svn/django/trunk@17739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17Fixed various dodgy behavioursAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16Fixed #17323 -- Renamed HttpRequest.raw_post_data to request.body. Thanks ↵Adrian Holovaty
for the patch, dstufft git-svn-id: http://code.djangoproject.com/svn/django/trunk@17210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27Fixed #16040 -- Preserved scheme, host and port in the test client when ↵Aymeric Augustin
following a redirect. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22Fixed #15826 -- Made `assertContains` and `assertNotContains` work with ↵Julien Phalip
`SimpleTemplateResponse` by forcing it to be rendered if it hasn't been rendered yet. Thanks to bmihelac for the report, to mmcnickle for the initial patch and tests, and to Carl Meyer for the guidance. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18Fixed #17067 -- reverted some backwards-incompatible changes from r16933 and ↵Aymeric Augustin
added tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17010 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23Fixed #10571 -- Factored out the payload encoding code to make sure it is ↵Russell Keith-Magee
used for PUT requests. Thanks to kennu for the report, pterk for the patch, and wildfire for the review comments. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-28Fixed #15785 -- Stopped HttpRequest.read() from reading beyond the end of a ↵Jannis Leidel
wsgi.input stream and removed some redundant code in the multipartparser. Thanks, tomchristie, grahamd and isagalaev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16479 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-12Fixed incompatibility (usage of class decorator) with Python 2.5 introduced ↵Ramiro Morales
in [16386]. Thanks ojii for the report via IRC. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-12Fixed #7836 -- Modified strategy used by the test client to check for ↵Ramiro Morales
session functionality so it is useful in environments where the DB-based session backend isn't being used. Thanks trevor for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16386 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-30Fixed #15929 - test.client.RequestFactory keeps state/AuthMiddleware does ↵Luke Plant
monkey patching Thanks to m.vantellingen for the report and tests, and to aaugustin for work on the tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Corrected warning filter in test_client_regressRussell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Updated to test_client_regress to use RedirectView instead of deprecated ↵Russell Keith-Magee
redirect_to. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Updated test assertions that have been deprecated by the move to unittest2. ↵Russell Keith-Magee
In summary, this means: assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-27Fixed #15368 - test failures due to regression with RequestContextLuke Plant
Thanks to cyberdelia for the reports on this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-21Fixed #14753 -- Fixed the test client to not raise an AssertionError when ↵Ramiro Morales
request.raw_post_data is accessed from a view it has fetched with GET. Thanks zimnyx for the report and ojii for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-19Fixed a regression in the test suite from [15236].Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-17Fixed #14468 -- Extended the list of content types that the test client ↵Jannis Leidel
could guess when handling zip files. Thanks, Russ and emulbreh. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04Removed all usages of deprecated TestCase methods (self.fail*). This ↵Alex Gaynor
removed most of the Warnings emitted (with -Wall) during the test suite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10Fixed #12226 -- Deprecated test client Response.template attribute in favor ↵Carl Meyer
of templates attribute, which is always a list. Thanks Russell for patch review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-21Fixed #13140 -- Ensure that request headers are preserved through redirect ↵Russell Keith-Magee
chains in the test client. Thanks to David Novakovic for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06Fixed #11159 -- Added mimetype detection to the test client for file ↵Russell Keith-Magee
uploads. Thanks to notanumber for the report and patch, and lomin for the test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06Fixed #13615 -- Clarified test assertion text to avoid confusion when ↵Russell Keith-Magee
response content isn't a web page. Thanks to DaNmarner for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06Fixed #13092 -- Added support for the "in" operator when dealing with ↵Russell Keith-Magee
context lists. Thanks to clelland for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-19Fixed #13152 -- Ensure the test client saves the session before writing the ↵Russell Keith-Magee
session key to the cookie, in case the session engine changes the session key. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12806 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-14Fixed a couple Python 2.4 incompatibilities.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-22Fixed #12659 -- Return a more meaningful KeyError message when ContextList ↵Russell Keith-Magee
lookups fail. Thanks to rodriguealcazar for the suggestion. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-22Fixed #10314 -- Added a message prefix argument to Django's test assertions. ↵Russell Keith-Magee
Thanks to Wes Winham for the original suggestion, and Chistian Oudard for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-14Fixed #6262 -- Added a cached template loader, and modified existing ↵Russell Keith-Magee
template loaders and tag to be cacheable. Thanks to Mike Malone for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-26Fixed #11371: Made `django.test.Client.put()` work for non-form-data PUT ↵Jacob Kaplan-Moss
(i.e. JSON, etc.). Thanks, phyfus. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11Fixed #10571 -- Ensured that unicode POST data is correctly encoded by the ↵Russell Keith-Magee
test client. Thanks to Rick Wagner for his help identifying and fixing this problem. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07Fixed #10183 -- Corrected the handling of unicode in assertContains and ↵Russell Keith-Magee
assertNotContains. Thanks to trbs for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31Fixed #10553 -- Corrected several uses of `URLconf` in documentation and ↵Gary Wilson Jr
comments, according to the Django style guide. Based on patch from rduffield. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10256 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30Fixed #9978 -- Fixed a KeyError exception that was being raised when using ↵Gary Wilson Jr
the logout method on the test client on an unauthenticated user, based on patch from ericholscher. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18Fixed #10482 -- Unified access to response.context when inspecting responses ↵Russell Keith-Magee
from the test client. Thanks to James Bennett for the design, and Julien Phalip for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-27Fixed #4476 -- Added a ``follow`` option to the test client request methods. ↵Russell Keith-Magee
This implements browser-like behavior for the test client, following redirect chains when a 30X response is received. Thanks to Marc Fargas and Keith Bussell for their work on this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9911 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12Fixed #9351 -- Modified the test client to pass on URL encoded parameters to ↵Russell Keith-Magee
the underlying views. Thanks to sime for the suggestion. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07Fixed #5888 -- Added methods to the test client to support HEAD, PUT, DELETEMalcolm Tredinnick
and OPTIONS support. Thanks Scott Barr and Leah Culver. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22Fixed #8136: Added a signal emission when an error is raised handling an ↵Russell Keith-Magee
error. This was required for the test client to handle missing 404.html templates and errors in the 404.html template. Thanks to danfairs for the report and fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15Fixed #7416: Modified test client to preserve session when a user logs in. ↵Russell Keith-Magee
Thanks to lakin.wecker@gmail.com for the report and Eric Holscher for the patch and test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02Fixed #7919 -- md5 and sha modules are deprecated since Python 2.5, use ↵Gary Wilson Jr
hashlib module when available. Patch from Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37