summaryrefslogtreecommitdiff
path: root/tests/utils_tests
AgeCommit message (Collapse)Author
2014-05-14[1.7.x] Added additional checks in is_safe_url to account for flexible parsing.Erik Romijn
This is a security fix. Disclosure following shortly.
2014-05-14[1.7.x] Dropped fix_IE_for_vary/attach.Aymeric Augustin
This is a security fix. Disclosure following shortly.
2014-03-30[1.7.x] Fixed #22338 -- Fixed a test dependent on dictionary key iteration ↵Tim Graham
order. Backport of 69a4f383f6 from master
2014-03-27[1.7.x] Fixed a deprecation warning on Python 3.Tim Graham
Backport of c19bbefca2 from master
2014-03-22[1.7.x] Tweaked strip_tags tests to pass on Python 3.3Claude Paroz
Backport of 6a0291bdaf from master.
2014-03-22[1.7.x] Improved strip_tags and clarified documentationClaude Paroz
The fact that strip_tags cannot guarantee to really strip all non-safe HTML content was not clear enough. Also see: https://www.djangoproject.com/weblog/2014/mar/22/strip-tags-advisory/ Backport of 6ca6c36f82b from master.
2014-03-13Fixed #21840 -- Moved dunder methods from SimpleLazyObject to LazyObject.Baptiste Mispelon
This commit also added tests for LazyObject and refactored the testsuite of SimpleLazyObject so that it can share test cases with LazyObject.
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-03-05Really hidden warnings in javascript_quote testsClaude Paroz
Refs #21725.
2014-03-01Fixed #22130 -- Deprecated fix_ampersands, removed utils.clean_html()Erik Romijn
2014-02-22Deprecated django.utils.text.javascript_quote.Baptiste Mispelon
Refs #21725.
2014-02-22Fixed test failures when running in a narrow Python build.Baptiste Mispelon
2014-02-15Fixed #21725 -- Fixed JavaScript quoting encoding.MattBlack85
Thanks to nedbatchelder for the report.
2014-02-08Fixed #21674 -- Deprecated the import_by_path() function in favor of ↵Berker Peksag
import_string(). Thanks Aymeric Augustin for the suggestion and review.
2014-02-06Fixed #21731 -- Made javascript_quote escapes '</'.Vajrasky Kok
2014-02-05Removed import which is now unusedAlex Gaynor
2014-02-05Revert "Fixed #20296 -- Allowed SafeData and EscapeData to be lazy"Baptiste Mispelon
This reverts commit 2ee447fb5f8974b432d3dd421af9a242215aea44. That commit introduced a regression (#21882) and didn't really do what it was supposed to: while it did delay the evaluation of lazy objects passed to mark_safe(), they weren't actually marked as such so they could end up being escaped twice. Refs #21882.
2014-01-25Moved sys.path-extending decorator to django.test.utils and used throughout ↵Carl Meyer
test suite. Thanks Aymeric for the suggestion.
2014-01-12Fixed #21756 -- Skipped two timezone-related tests on Windows.Aymeric Augustin
Windows cannot use a time zone other than the default time zone. Thanks manfre for the report.
2013-12-23Imported override_settings from its new location.Aymeric Augustin
2013-12-23Dropped AppCache._empty, _with_app and _without_app.Aymeric Augustin
It's now easier to achieve the same effect with modify_settings or override_settings.
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-22Expurged INSTALLED_APPS from code and tests.Aymeric Augustin
Except the app cache code and a few specific tests, of course.
2013-12-22Stopped iterating on INSTALLED_APPS.Aymeric Augustin
Used the app cache's get_app_configs() method instead.
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-12-12Fixed #21574 -- Handle bytes consistently in utils.text.normalize_newlines.Baptiste Mispelon
All input is now coerced to text before being normalized. This changes nothing under Python 2 but it allows bytes to be passed to the function without a TypeError under Python3 (bytes are assumed to be utf-8 encoded text). Thanks to trac user vajrasky for the report.
2013-12-07Fixed #21572 -- Added unit test for django.utils.text.normalize_newlines.Vajrasky Kok
2013-11-24Fixed #21505 -- Added unit test for django.utils.text.get_valid_filename.Vajrasky Kok
2013-11-11Fixed #9523 -- Restart runserver after compiling apps translationsBouke Haarsma
Django also uses locales provided by apps, which also might change. Also when i18n is disabled, there is no need for watching translation files.
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-02Fixing E302 ErrorsJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-11-02Fixed #9523 -- Restart runserver after translation MO files changeBouke Haarsma
Thanks to Krzysztof Kulewski for the initial patch.
2013-10-26Fix all violators of E231Alex Gaynor
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-17Fixed #18659 -- Deprecated request.REQUEST and MergeDictBouke Haarsma
Thanks Aymeric Augustin for the suggestion.
2013-10-15Merge pull request #1744 from unaizalakain/ticket_7261Alex Gaynor
Fixed #7261 -- support for __html__ for library interoperability
2013-10-15Fixed #7261 -- support for __html__ for library interoperabilityUnai Zalakain
The idea is that if an object implements __html__ which returns a string this is used as HTML representation (eg: on escaping). If the object is a str or unicode subclass and returns itself the object is a safe string type. This is an updated patch based on jbalogh and ivank patches.
2013-10-14Fixed #21266 -- Fixed E201,E202 pep8 warnings.Larry O'Neill
2013-10-13Fixed #21198 -- Prevented invalid use of @python_2_unicode_compatible.Aymeric Augustin
Thanks jpic for the report and chmodas for working on a patch. Reverts 2ea80b94. Refs #19362.
2013-10-10Whitespace cleanup.Tim Graham
* Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs.
2013-10-08Fixed #20568 -- truncatewords_html no longer splits words containing HTML ↵Jaap Roes
entities. Thanks yann0 at hotmail.com for the report.
2013-10-05Fixed #21161 -- Timezone-related tests on Windows.Aymeric Augustin
Thanks Xelnor for the patch.
2013-09-27Fix #21185: Added tests for unescape_entities.Baptiste Mispelon
Also fixed a py3 incompatibility. Thanks to brutasse for the report.
2013-09-18Fixed #21118 -- Isolated a test that uses the database.Tim Graham
Thanks rmboggs for the report.
2013-09-18Fixed #15625 -- Made message in MultiValueDictKeyError less verbose.Tim Graham
Thanks margieroginski for the suggestion.
2013-09-13Fixed #21060 -- Refactored admin's autodiscover method to make it reusable.Juan Catalano
We want to be able to use it for instance for discovering `tasks.py` modules inside the INSTALLED_APPS. This commit therefore moves the logic to `autodiscover_modules` method in django.utils.module_loading.