Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/middleware
Commit message (Collapse)AuthorAgeFilesLines
* Fixed "URLconf" spelling in code comments.Tim Graham2015-10-221-1/+1
|
* Fixed #25302 -- Prevented BrokenLinkEmailsMiddleware ↵Maxime Lorant2015-08-251-0/+18
| | | | from reporting 404s when Referer = URL.
* Fixed #24720 -- Avoided resolving URLs that don't end in ↵Jay Cox2015-07-311-17/+43
| | | | | | a slash twice in CommonMiddleware. This speeds up affected requests by about 5%.
* Fixed some unclosed objects in testsAndriy Sokolovskiy2015-07-061-1/+2
|
* Removed unused code after refs #25017.Tim Graham2015-06-271-6/+4
|
* Fixed #25017 -- Allowed customizing the ↵sujayskumar2015-06-271-3/+3
| | | | DISALLOWED_USER_AGENTS response
* Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette2015-05-202-9/+9
|
* Fixed #24681 -- Removed Unicode bug in ↵Oliver A Bristow2015-04-211-0/+10
| | | | BrokenLinkEmailMiddleware
* Rephrased docstrings to assertions and added querystring ↵Bas Peschier2015-03-261-14/+21
| | | | test.
* Fixed #23960 -- Removed http.fix_location_headerClaude Paroz2015-03-181-6/+6
| | | | Thanks Carl Meyer for the report and Tim Graham for the review.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-063-12/+14
|
* Fixed #24149 -- Normalized tuple settings to lists.darkryder2015-02-031-2/+2
|
* Fixed #24240 -- Allowed GZipping a Unicode ↵Matthew Somerville2015-02-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | StreamingHttpResponse make_bytes() assumed that if the Content-Encoding header is set, then everything had already been dealt with bytes-wise, but in a streaming situation this was not necessarily the case. make_bytes() is only called when necessary when working with a StreamingHttpResponse iterable, but by that point the middleware has added the Content-Encoding header and thus make_bytes() tried to call bytes(value) (and dies). If it had been a normal HttpResponse, make_bytes() would have been called when the content was set, well before the middleware set the Content-Encoding header. This commit removes the special casing when Content-Encoding is set, allowing unicode strings to be encoded during the iteration before they are e.g. gzipped. This behaviour was added a long time ago for #4969 and it doesn't appear to be necessary any more, as everything is correctly made into bytes at the appropriate places. Two new tests, to show that supplying non-ASCII characters to a StreamingHttpResponse works fine normally, and when passed through the GZip middleware (the latter dies without the change to make_bytes()). Removes the test with a nonsense Content-Encoding and Unicode input - if this were to happen, it can still be encoded as bytes fine.
* Fixed #24145 -- Added PUT & PATCH to CommonMiddleware ↵Samuel Colvin2015-01-291-3/+12
| | | | APPEND_SLASH redirect error.
* Fixed #24072 -- Added FileResponse for streaming binary ↵Collin Anderson2015-01-051-2/+16
| | | | files.
* Converted middleware tests to use RequestFactory.Berker Peksag2014-12-291-54/+33
|
* Fixed #23812 -- Changed django.utils.six.moves.xrange ↵Michael Hall2014-12-131-2/+2
| | | | imports to range
* Fixed #23806 -- Added a test case for ↵Sean Wang2014-11-131-0/+10
| | | | settings.DISALLOWED_USER_AGENTS.
* Fixed #23531 -- Added ↵Berker Peksag2014-11-041-1/+21
| | | | CommonMiddleware.response_redirect_class.
* Fixed #23620 -- Used more specific assertions in the ↵Berker Peksag2014-11-032-9/+9
| | | | Django test suite.
* Fixed #17101 -- Integrated django-secure and added check ↵Tim Graham2014-09-121-0/+202
| | | | | | | | | --deploy option Thanks Carl Meyer for django-secure and for reviewing. Thanks also to Zach Borboa, Erik Romijn, Collin Anderson, and Jorge Carleitao for reviews.
* Fixed #23276 -- Deprecated passing views as strings to ↵Tim Graham2014-08-122-6/+10
| | | | url().
* Fixed #22440 -- Updated ConditionalGetMiddleware to ↵Mark Lavin2014-06-141-0/+28
| | | | comply with RFC 2616.
* Fixed #17552 -- Removed a hack for IE6 and earlier.Aymeric Augustin2014-06-101-10/+0
| | | | | | | It prevented the GZipMiddleware from compressing some data types even on more recent version of IE where the corresponding bug was fixed. Thanks Aaron Cannon for the report and Tim Graham for the review.
* Removed executeable bit from a few files.Florian Apolloner2014-05-251-0/+0
|
* Fixed #21157 -- Fixed problems with ResolverMatchKevin Christopher Henry2014-04-243-6/+11
| | | | | | | | | | - Fixed bug in get_callable() that caused resolve() to put a string in ResolverMatch.func. - Made ResolverMatch.url_name match the actual url name (or None). - Updated tests that used the string value in ResolverMatch.func, and added regression tests for this bug. - Corrected test urls whose dummy view paths caused failures (behavior that was previously masked by this bug).
* Fixed #21977 -- Deprecated SimpleTestCase.urlsAnubhav Joshi2014-04-061-2/+2
|
* Fixed #22218 -- Deprecated django.conf.urls.patterns.Tim Graham2014-04-033-16/+16
| | | | Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
* Removed legacy transaction management per the ↵Aymeric Augustin2014-03-212-81/+1
| | | | deprecation timeline.
* Removed settings.SEND_BROKEN_LINK_EMAILS per deprecation ↵Tim Graham2014-03-211-40/+0
| | | | timeline.
* Fixed #21188 -- Introduced subclasses for ↵Claude Paroz2014-03-081-3/+4
| | | | | | | to-be-removed-in-django-XX warnings Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
* Fixed #21774 -- Isolate all test urls from eachother.Marc Tamlyn2014-01-142-14/+15
| | | | | | | | | | | | | 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.
* Imported override_settings from its new location.Aymeric Augustin2013-12-231-2/+2
|
* PEP8 cleanupJason Myers2013-11-031-5/+7
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed #21302 -- Fixed unused imports and import *.Tim Graham2013-11-021-1/+1
|
* Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol2013-10-231-0/+2
|
* Fixed #21268 -- Fixed E303 pep8 warningsAlasdair Nicol2013-10-181-1/+0
|
* Removed most of absolute_import importsClaude Paroz2013-07-291-1/+1
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Stopped using django.utils.unittest in the test suite.Aymeric Augustin2013-07-011-1/+1
| | | | Refs #20680.
* Advanced deprecation warnings for Django 1.7.Aymeric Augustin2013-06-291-5/+5
|
* Defined available_apps in relevant tests.Aymeric Augustin2013-06-101-0/+3
| | | | Fixed #20483.
* Fixed #20099 -- Eased subclassing of ↵Claude Paroz2013-05-251-0/+19
| | | | | | | BrokenLinkEmailsMiddleware Thanks Ram Rachum for the report and the initial patch, and Simon Charette for the review.
* Moved IgnorePendingDeprecationWarningsMixin in ↵Aymeric Augustin2013-05-181-3/+1
| | | | | | django.test.utils. This mixin is useful whenever deprecating a large part of Django.
* Fixed #20356 -- Prevented crash when HTTP_REFERER ↵Claude Paroz2013-05-181-1/+9
| | | | | | contains non-ascii Thanks srusskih for the report and Aymeric Augustin for the review.
* Fixed tests that relied on MANAGERS not being empty.Aymeric Augustin2013-03-111-4/+10
| | | | Regression in d0561242.
* Removed a test that no longer makes any sense.Aymeric Augustin2013-03-111-13/+0
| | | | Since unmanaged == autocommit, there's nothing to commit or roll back.
* Added some assertions to enforce the atomicity of atomic.Aymeric Augustin2013-03-111-1/+5
|
* Deprecated transaction.is_managed().Aymeric Augustin2013-03-111-1/+1
| | | | It's synchronized with the autocommit flag.
* Enabled autocommit for PostgreSQL.Aymeric Augustin2013-03-111-0/+5
| | | | | | | | | For users who didn't activate autocommit in their database options, this is backwards-incompatible in "non-managed" aka "auto" transaction state. This state now uses database-level autocommit instead of ORM-level autocommit. Also removed the uses_autocommit feature which lost its purpose.
* Made transaction.managed a no-op and deprecated it.Aymeric Augustin2013-03-111-5/+1
| | | | | | | | | | | | | | 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.