summaryrefslogtreecommitdiff
path: root/tests/requests/tests.py
AgeCommit message (Collapse)Author
2015-10-23Fixed #17133 -- Properly handled successive slashes in incoming requestsClaude Paroz
Thanks gjanee@ucop.edu for the report and Tim Graham for the review.
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-09-04Fixed #25099 -- Fixed crash in AdminEmailHandler on DisallowedHost.Vlastimil Zíma
2015-08-04Fixed #25211 -- Added HttpRequest.get_port() and USE_X_FORWARDED_PORT setting.Matt Robenolt
2015-07-13Fixed #25099 -- Cleaned up HttpRequest representations in error reporting.Vlastimil Zíma
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-20Fixed typos in code comments.Adam Taylor
2015-01-19Fixed #24153 -- Fixed cookie test compatibility with Python 3.4.3+Tim Graham
2014-12-30Fixed #23450 -- Fixed transient failure of requests...test_far_expiration.Tim Graham
2014-11-20Fixed #12098 -- Simplified HttpRequest.__repr__().Berker Peksag
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-11-03Fixed #18456 -- Added path escaping to HttpRequest.get_full_path().Unai Zalakain
2014-09-29Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.Thomas Chaumeny
Thanks Collin Anderson for the review.
2014-08-03Fixed #19802 -- Fixed HttpResponse.set_cookie() with unicode data on Python 2.qingfeng
Thanks django at patrickbregman.eu for the report.
2014-07-05Updated tests per previous commit.Tim Graham
2014-06-24Fixed #22799 -- Made GET and POST on HttpRequest QueryDicts, and FILES a ↵Duncan Parkes
MultiValueDict. Previously, GET, POST, and FILES on an HttpRequest were created in the __init__ method as dictionaries. This was not something you would usually notice causing trouble in production as you'd only see a WSGIRequest, but in testing using the test client, calling .getlist on GET, POST, or FILES for a request with no get/post data resulted in an AttributeError. Changed GET and POST on an HttpRequest object to be mutable QueryDicts (mutable because the Django tests, and probably many third party tests, were expecting it).
2014-06-07Fixed #18314 -- Corrected request.build_absolute_uri() handling of paths ↵Unai Zalakain
starting with // ``HttpRequest.build_absolute_uri()`` now correctly handles paths starting with ``//``. ``WSGIRequest`` now doesn't remove all the leading slashes either, because ``http://test/server`` and http://test//server`` aren't the same thing (RFC2396). Thanks to SmileyChris for the initial patch.
2014-03-21Removed legacy transaction management per the deprecation timeline.Aymeric Augustin
2014-03-09Corrected a few missed references to old test settingsShai Berger
2014-02-02Make mysql's CursorWrapper a contextmanager.Michael Manfre
2014-02-02Ensure cursors are closed when no longer needed.Michael Manfre
This commit touchs various parts of the code base and test framework. Any found usage of opening a cursor for the sake of initializing a connection has been replaced with 'ensure_connection()'.
2013-12-23Imported override_settings from its new location.Aymeric Augustin
2013-11-16Fixed #21447 -- Restored code erroneously removed in ↵Baptiste Mispelon
20472aa827669d2b83b74e521504e88e18d086a1. Also added some tests for HttpRequest.__repr__. Note that the added tests don't actually catch the accidental code removal (see ticket) but they do cover a codepath that wasn't tested before. Thanks to Tom Christie for the report and the original patch.
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-02Fixed all E261 warningscoagulant
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-10-24Fixed #20338 -- Stripped ending dot during host validationClaude Paroz
Thanks manfre for the report and Timo Graham for the review.
2013-10-23Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol
2013-10-21Fixed #21288 -- Fixed E126 pep8 warningsAlasdair Nicol
2013-10-19Removed unused local variables in tests.Tim Graham
2013-10-18Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol
2013-10-18Fixed #21268 -- Fixed E303 pep8 warningsAlasdair Nicol
2013-10-08Fixed #16822 -- Added RawPostDataExceptionTim Graham
Thanks jaylett for the patch.
2013-09-05Took advantage of django.utils.six.moves.urllib.*.Aymeric Augustin
2013-07-31Fixed #19987 -- Disabled host validation when DEBUG=True.Will Hardy
The documentation promises that host validation is disabled when DEBUG=True, that all hostnames are accepted. Domains not compliant with RFC 1034/1035 were however being validated, this validation has now been removed when DEBUG=True. Additionally, when DEBUG=False a more detailed SuspiciousOperation exception message is provided when host validation fails because the hostname is not RFC 1034/1035 compliant.
2013-07-13Isolated host validation tests in own test caseClaude Paroz
2013-07-09Fixed #20724 -- Test failure on SQLite.Aymeric Augustin
This test failure happened if the connection's NAME was set to a file system path, and its TEST_NAME wasn't. Thanks Claude for the report.
2013-07-01Stopped using django.utils.unittest in the test suite.Aymeric Augustin
Refs #20680.
2013-06-10Defined available_apps in relevant tests.Aymeric Augustin
Fixed #20483.
2013-06-01Fixed #18481 -- Wrapped request.FILES read error in UnreadablePostErrorClaude Paroz
Thanks KyleMac for the report, André Cruz for the initial patch and Hiroki Kiyohara for the tests.
2013-05-18Made test introduced in 566e284c pass on Python 3.Aymeric Augustin
2013-05-18Added test for multipart, non form-data POST.Senko Rasic
Closes #9054. The bug itself is no longer present.
2013-04-03Fixed #20038 -- Better error message for host validation.Baptiste Mispelon
2013-04-01Fixed #20169 -- Ensured that the WSGI request's path is correctly based on ↵Julien Phalip
the `SCRIPT_NAME` environment parameter or the `FORCE_SCRIPT_NAME` setting, regardless of whether or not those have a trailing slash. Thanks to bmispelon for the review.
2013-03-11Made transaction.managed a no-op and deprecated it.Aymeric Augustin
enter_transaction_management() was nearly always followed by managed(). In three places it wasn't, but they will all be refactored eventually. The "forced" keyword argument avoids introducing behavior changes until then. This is mostly backwards-compatible, except, of course, for managed itself. There's a minor difference in _enter_transaction_management: the top self.transaction_state now contains the new 'managed' state rather than the previous one. Django doesn't access self.transaction_state in _enter_transaction_management.
2013-02-28Fixed tests broken in 2ee21d9.Aymeric Augustin
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner