summaryrefslogtreecommitdiff
path: root/django/test/utils.py
AgeCommit message (Collapse)Author
2017-09-11Fixed #28578 -- Renamed DatabaseCreation number arguments to suffix.Jon Dufresne
2017-08-24Used sets for CheckRegistry.registered_checks and deployment_checks.Sergey Fedoseev
2017-08-21Removed need for hasattr(check, 'tags') in CheckRegistry.Sergey Fedoseev
It was needed to pass tests because registered checks weren't properly mocked.
2017-05-18Fixed #28203 -- Ignored connection configuration queries in assertNumQueries().François Freitag
2017-04-27Removed obsolete django.test.utils.strip_quotes().Tim Graham
Django's test runners no longer discover doctests.
2017-04-27Replaced set |= operator with update() to avoid temporary set.Jon Dufresne
2017-03-04Refs #27656 -- Updated remaining docstring verbs according to PEP 257.Anton Samarchyan
2017-02-24Fixed #27873 -- Fixed crash in setup_test_environment() if ALLOWED_HOSTS is ↵Chris Lamb
a tuple. Regression in 17e661641ddaf8266e7430d83cfb2039abc55df7
2017-01-26Refs #23919, #27778 -- Removed obsolete mentions of unicode.Vytis Banaitis
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-21Refs #23919 -- Removed misc references to Python 2.Tim Graham
2017-01-21Refs #23919 -- Removed django.utils.decorators.available_attrs() usage.Tim Graham
It's only needed to workaround a bug on Python 2.
2017-01-20Refs #23919 -- Removed unneeded force_str callsClaude Paroz
2017-01-19Refs #23919 -- Removed reset_warning_registry() workaround for Python < 3.4.2.Tim Graham
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-06Fixed #27698 -- Added django.test.utils.ContextList.get()Tim Graham
2016-08-17Fixed #26840 -- Added test.utils.setup/teardown_databases().Andreas Pelme
2016-08-15Fixed #27057 -- Made setup_test_environment() store saved settings in one place.Chris Jerdonek
2016-08-10Fixed #27019 -- Made teardown_test_environment() restore the old DEBUG.Chris Jerdonek
2016-08-08Fixed #27032 -- Prevented setup_test_environment() from being called twice.Chris Jerdonek
2016-08-05Edited docs of test.utils.setup/teardown_test_environment().Chris Jerdonek
2016-06-20Refs #26666 -- Added ALLOWED_HOSTS validation when running tests.Tobias McNulty
Also used ALLOWED_HOSTS to check for external hosts in assertRedirects().
2016-06-15Fixed broken links in docs and comments.Ville Skyttä
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.