| Age | Commit message (Collapse) | Author |
|
Backport of 15b711b from master.
|
|
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
|
|
Backport of 146dd7be8dad4cd6264d374b681256a8b0d5808b from master
|
|
changes during tests
Cleared caching in staticfiles_storage and get_finder when
relevant settings are changed.
Backport of 2730dad0d7c425f33f1ecc6cec01fdbf1cdd8376 from master
|
|
|
|
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.
Backport of 2133f31 from master.
Conflicts:
docs/topics/http/shortcuts.txt
tests/generic_views/test_base.py
|
|
Added a --debug-sql option for tests and runtests.py which outputs the
SQL logger for failing tests. When combined with --verbosity=2, it also
outputs the SQL for passing tests.
Thanks to Berker, Tim, Markus, Shai, Josh and Anssi for review and
discussion.
|
|
Refs #21281. Thanks Tim Graham and Thomas Chaumeny for investigations.
|
|
And removed Ignore*DeprecationWarningsMixin, now obsolete.
Thanks Berker Peksag and Tim Graham for the review.
|
|
|
|
|
|
This removes the need to load django.test when not testing.
|
|
|
|
|
|
|
|
comprehension
|
|
warnings from appearing in tests.
|
|
|
|
|
|
Each TestCase is also now wrapped in a class-wide transaction.
|
|
|
|
router.
|
|
test.support.
StringIO import was adapted for compatibility with Python 2.
|
|
When the test client detects a redirect to a URL seen in the
currently followed chain it will now raise a RedirectCycleError
instead of just returning the first repeated response.
It will also complain when a single chain of redirects is longer
than 20, as this often means a redirect loop with varying URLs,
and even if it's not actually one, such long chains are likely
to be treated as loops by browsers.
Thanks Preston Timmons, Berker Peksag, and Tim Graham for reviews.
|
|
This is useful for debugging side effects affecting tests that
are usually executed before a given test. Full suite and pair
tests sort cases more or less deterministically, thus some test
cross-dependencies are easier to reveal by reversing the order.
Thanks Preston Timmons for the review.
|
|
|
|
Since RequestContext doesn't know its Engine until it's passed to
Template.render() -- and cannot without breaking a widely used public
API -- an elaborate hack is required to apply context processors.
|
|
|
|
Passed the engine instance to loaders. This is a prerequisite for
looking up configuration on the engine instance instead of global
settings.
This is backwards incompatible for custom template loaders that override
__init__. However the documentation doesn't talk about __init__ and the
way to pass arguments to custom template loaders isn't specified. I'm
considering it a private API.
|
|
Moved Django templates loading infrastructure there.
|
|
|
|
|
|
|
|
This provides the opportunity to move utility functions specific to the
Django Template Language outside of django.template.loader.
|
|
They can be replaced with override_settings and that makes the
corresponding tests much more obvious.
|
|
This change has the nice side effect of removing code that ran at import
time and depended on the app registry at module level -- a notorious
cause of AppRegistryNotReady exceptions.
|
|
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.
|
|
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.
|
|
|
|
|
|
fetched using the test client.
Thanks zags for the report and bmispelon for the patch.
|
|
TestCase decorator.
|
|
Thanks KevinEtienne for the suggestion.
|
|
|
|
This fixes a regression introduced by 2a31d00933.
Thanks tony-zhu for the report.
|
|
|
|
Thanks Loic Bistuer for helping in shaping the patch and Claude Paroz
for the review.
|
|
Added MEDIA_URL, FILE_UPLOAD_PERMISSIONS, and
FILE_UPLOAD_DIRECTORY_PERMISSIONS to the list of settings.
|
|
ordered=False
|
|
Thanks Collin Anderson for the review.
|