summaryrefslogtreecommitdiff
path: root/django/test/utils.py
AgeCommit message (Collapse)Author
2016-06-15[1.10.x] Fixed broken links in docs and comments.Ville Skyttä
Backport of 96f97691ad5e1483263cea3bb4e4021b4c8dcc41 from master
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-04-04Fixed W503 flake8 warnings.Tim Graham
2016-03-15Fixed #26157 #25321 -- Added sql/params to extra context of schema loggerMarkus Holtermann
Thanks Akshesh Doshi for the initial patch and Tim Graham for the review
2016-02-17Fixed #25735 -- Added support for test tags to DiscoverRunner.Jakub Paczkowski
Thanks Carl Meyer, Claude Paroz, and Simon Charette for review.
2016-01-06Unified test context decorators.Simon Charette
Thanks to Tim for the review.
2016-01-06Refs #25746 -- Added a test utility to isolate inlined model registration.Simon Charette
Thanks to Tim for the review.
2015-12-31Fixed #26013 -- Moved django.core.urlresolvers to django.urls.Marten Kenbeek
Thanks to Tim Graham for the review.
2015-11-09Fixed #25170 -- Made assertXMLEqual()/assertXMLNotEqual() ignore leading and ↵Mattia Larentis
trailing whitespace. Thanks Jacek Bzdak for indepdently contributing a similar fix.
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-08-27Fixed #24590 -- Cached calls to swappable_setting.Markus Holtermann
Moved the lookup in Field.swappable_setting to Apps, and added an lru_cache to cache the results. Refs #24743 Thanks Marten Kenbeek for the initial work on the patch. Thanks Aymeric Augustin and Tim Graham for the review.
2015-04-24Fixed #24526 -- Combined django.request/security loggers with the root logger.Tim Graham
Thanks Carl Meyer for 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-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24168 -- Allowed selecting a template engine in a few APIs.Aymeric Augustin
Specifically in rendering shortcuts, template responses, and class-based views that return template responses. Also added a test for render_to_response(status=...) which was missing from fdbfc980. Thanks Tim and Carl for the review.
2015-01-18Removed test.utils.TestTemplateLoader per deprecation timeline.Tim Graham
2014-12-30Added ignore_warnings decoratorClaude Paroz
And removed Ignore*DeprecationWarningsMixin, now obsolete. Thanks Berker Peksag and Tim Graham for the review.
2014-12-22Fixed #23792 -- Added test.utils.freeze_time() context manager.Thomas Chaumeny
2014-12-08Fixed #23968 -- Replaced list comprehension with generators and dict ↵Jon Dufresne
comprehension
2014-12-06Refs #23947 -- Worked around a bug in Python that prevents deprecation ↵Diego Guimarães
warnings from appearing in tests.
2014-12-06Updated obsolete comment.Aymeric Augustin
2014-11-29Fixed #23930 -- Added copies of captured_std* managers from CPython's ↵wrwrwr
test.support. StringIO import was adapted for compatibility with Python 2.
2014-11-16Removed override_template_loaders and override_with_test_loader.Aymeric Augustin
They can be replaced with override_settings and that makes the corresponding tests much more obvious.
2014-11-16Moved all template loaders under django.template.loaders.Aymeric Augustin
Reformatted the code of base.Loader according to modern standards. Turned the test template loader into a regular locmem.Loader -- but didn't document it. Added a normal deprecation path for BaseLoader which is a public API. Added an accelerated deprecation path for TestTemplateLoader which is a private API.
2014-11-16Fixed regression in 4dc4d12e. Refs #21598.Aymeric Augustin
That commit contained a mistake that resulted in the use_cached_loader option of override_with_test_loader being ignored. As a consequence some configurations weren't exercised any more by the test suite.
2014-09-12Fixed #17101 -- Integrated django-secure and added check --deploy optionTim Graham
Thanks Carl Meyer for django-secure and for reviewing. Thanks also to Zach Borboa, Erik Romijn, Collin Anderson, and Jorge Carleitao for reviews.
2014-08-28Factorize some code using ContextDecorator.Thomas Chaumeny
2014-07-26Fixed #22873 -- Renamed use_debug_cursor to force_debug_cursor to clarify ↵areski
the behavior.
2014-06-07Fixed #3711, #6734, #12581 -- Bounded connection.queries.Aymeric Augustin
Prevented unlimited memory consumption when running background tasks with DEBUG=True. Thanks Rob, Alex, Baptiste, and others.
2014-05-22Fixed #21598 -- cleaned up template loader overrides in testsUnai Zalakain
- Template loader overriding is managed with contexts. - The test loader is a class (function based loaders entered deprecation timeline in 1.4). - Template loader overrider that overrides with test loader added.
2014-03-22Advanced deprecation warnings for 1.8.Aymeric Augustin
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-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2014-01-27Removed TransRealMixin.Aymeric Augustin
Fixed #21688. Refs https://github.com/django/django/pull/1147.
2014-01-26Fixed some missing/extraneous new line warnings.Simon Charette
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-20Fixed #16905 -- Added extensible checks (nee validation) frameworkRussell Keith-Magee
This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24Fixed override_settings when set_available_apps raises an exception.Aymeric Augustin
Previously, this would corrupt the settings, because __exit__ isn't called when __enter__raises an exception.
2013-12-23Added modify_settings to alter settings containing lists of values.Aymeric Augustin
2013-12-23Refactored INSTALLED_APPS overrides.Aymeric Augustin
* Introduced [un]set_installed_apps to handle changes to the INSTALLED_APPS setting. * Refactored [un]set_available_apps to share its implementation with [un]set_installed_apps. * Implemented a receiver to clear some app-related caches. * Removed test_missing_app as it is basically impossible to reproduce this situation with public methods of the new app cache.
2013-11-11Fixed #21351 -- Replaced memoize with Python's lru_cache.Bouke Haarsma
Replaced the custom, untested memoize with a similar decorator from Python's 3.2 stdlib. Although some minor performance degradation (see ticket), it is expected that in the long run lru_cache will outperform memoize once it is implemented in C. Thanks to EvilDMP for the report and Baptiste Mispelon for the idea of replacing memoize with lru_cache.
2013-11-09Fixed #21383 -- Added request details in SuspiciousOperation messagesClaude Paroz
2013-11-04Merge pull request #1821 from Bouke/tickets/14170Aymeric Augustin
#14170 -- Reset i18n cache when settings changed
2013-11-03Fixed #14170 -- Reset i18n cache when settings changeBouke Haarsma
2013-11-02Fixed flake8 E241Boryslav Larin
2013-10-26Fixed up some more flake8 violations (this particular violation still has ↵Alex Gaynor
many occurrences in the tests/ dir so it can't be removed from setup.cfg yet)
2013-10-23Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol
2013-10-22Fixed #21307 -- Moved TransRealMixin to django.test.utils.Ramiro Morales
2013-10-15Fixed #21263 -- Fixed issue with override_settings in inherited classesClaude Paroz
When both parent and child classes are decorated with override_settings, child class settings should take precedence. Thanks Sephi for the report and Marc Tamlyn for the review.