From cffa55908271bfbce9069b979ab150cd806c6d59 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 15 Nov 2014 18:43:48 +0100 Subject: [PATCH] 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. --- django/test/utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/django/test/utils.py b/django/test/utils.py index 91a254ef5e..9e09e97372 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -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):