0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00

Fixed regression in 4dc4d12e. Refs #21598.

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.
This commit is contained in:
Aymeric Augustin 2014-11-15 18:43:48 +01:00
parent dec93d8991
commit cffa559082

View File

@ -238,9 +238,11 @@ class override_with_test_loader(override_template_loaders):
@classmethod
def _get_loader(cls, templates_dict, use_cached_loader=False):
if use_cached_loader:
loader = cached.Loader(('TestTemplateLoader',))
loader._cached_loaders = TestTemplateLoader(templates_dict)
return TestTemplateLoader(templates_dict)
loader = cached.Loader(['TestTemplateLoader'])
loader._cached_loaders = [TestTemplateLoader(templates_dict)]
return loader
else:
return TestTemplateLoader(templates_dict)
class override_settings(object):