summaryrefslogtreecommitdiff
path: root/tests/i18n/patterns/tests.py
AgeCommit message (Collapse)Author
2026-01-18Applied Black's 2026 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/26.1.0
2024-03-02Refs #26431 -- Added more test for translated path().Adam Johnson
2023-12-31Used addCleanup() in tests where appropriate.Mariusz Felisiak
2023-05-02Fixed #34515 -- Made LocaleMiddleware prefer language from paths when i18n ↵Mariusz Felisiak
patterns are used. Regression in 94e7f471c4edef845a4fe5e3160132997b4cca81. This reverts commit 94e7f471c4edef845a4fe5e3160132997b4cca81 (refs #34069) and partly reverts commit 3b4728310a7a64f8fcc548163b0aa5f98a5c78f5. Thanks Anthony Baillard for the report. Co-Authored-By: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2023-01-04Refs #34074 -- Used headers argument for RequestFactory and Client in docs ↵David Wobrock
and tests.
2022-10-04Fixed CVE-2022-41323 -- Prevented locales being interpreted as regular ↵Adam Johnson
expressions. Thanks to Benjamin Balder Bach for the report.
2022-03-29Fixed #16406 -- Added ResolveMatch.captured_kwargs and extra_kwargs.Alokik Vijay
Thanks Florian Apolloner for the review and implementation idea.
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
2021-09-01Fixed #32768 -- Added Vary header when redirecting to prefixed i18n pattern.Alex Hayward
get_language_from_request() uses Accept-Language and/or Cookie to determine the correct redirect. Upstream caches need the matching Vary header to cache the result.
2020-09-14Fixed #31789 -- Added a new headers interface to HttpResponse.Tom Carrick
2020-02-18Refs #26601 -- Deprecated passing None as get_response arg to middleware ↵Claude Paroz
classes. This is the new contract since middleware refactoring in Django 1.10. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-06-24Fixed #26431 -- Prevented django.urls.resolve() from returning missing ↵daniel a rios
optional parameters. Previous behavior was inconsistent with django.urls.reverse() and caused that translate_url() created an incorrect URL when an optional parameter was missing.
2019-06-24Refs #26431 -- Added tests for resolving URL and translate_url() with ↵daniel a rios
provided optional parameter.
2018-02-21Changed "language-code" to the more commonly used "language code".Sebastian Sangervasi
2017-09-20Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.Sjoerd Job Postmus
Thanks Aymeric Augustin for shepherding the DEP and patch review. Thanks Marten Kenbeek and Tim Graham for contributing to the code. Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
2017-09-14Fixed a Dutch translation in i18n tests.Tim Graham
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-03-17Replaced type-specific assertions with assertEqual().Tim Graham
Python docs say, "it's usually not necessary to invoke these methods directly."
2017-02-03Fixed spelling of "nonexistent".Tim Graham
2017-01-20Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham
These functions do nothing on Python 3.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-05-17Fixed #26601 -- Improved middleware per DEP 0005.Florian Apolloner
Thanks Tim Graham for polishing the patch, updating the tests, and writing documentation. Thanks Carl Meyer for shepherding the DEP.
2016-03-07Fixed #26271 -- Fixed i18n_patterns resolution when no language is activeClaude Paroz
Thanks Marten Kenbeek for the report.
2016-03-03Fixed #26295 -- Allowed using i18n_patterns() in any root URLconf.Simon Charette
Thanks Tim for the review.
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2015-12-31Fixed #26013 -- Moved django.core.urlresolvers to django.urls.Marten Kenbeek
Thanks to Tim Graham for the review.
2015-10-22Fixed "URLconf" spelling in code comments.Tim Graham
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-03-26Fixed #19910 -- Added slash to i18n redirect if APPEND_SLASH is set.Bas Peschier
This introduces a force_append_slash argument for request.get_full_path() which is used by RedirectFallbackMiddleware and CommonMiddleware when handling redirects for settings.APPEND_SLASH.
2015-03-18Fixed #23960 -- Removed http.fix_location_headerClaude Paroz
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-03-18Fixed #24476 -- Added context manager/decorator for overriding script prefix.Bas Peschier
Tests were using an undocumented keyword argument for easily overriding script prefix while reversing. This is now changed into a test utility which can be used as decorator or context manager.
2015-03-13Fixed #24122 -- Redirected to translated url after setting languageClaude Paroz
Thanks gbdlin for the initial patch and Tim Graham for the review.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24149 -- Normalized tuple settings to lists.darkryder
2014-12-28Deprecated TEMPLATE_DIRS.Aymeric Augustin
2014-08-14Fixed #21579 -- Made LocaleMiddleware respect script prefix.Tim Graham
Thanks buettgenbach at datacollect.com for the report and patch.
2014-04-06Fixed #21977 -- Deprecated SimpleTestCase.urlsAnubhav Joshi
2013-12-23Imported override_settings from its new location.Aymeric Augustin
2013-10-26Fix all violators of E231Alex Gaynor
2013-10-03Fixed #19277 -- Added LocaleMiddleware.response_redirect_classEmil Stenström
Thanks ppetrid at yawd.eu for the suggestion.
2013-06-04Added i18n-related URL mapper test for a mailing list report.Ramiro Morales
2013-02-26Renamed some tests and removed references to modeltests/regressiontests.Florian Apolloner
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner