diff --git a/tests/regressiontests/templates/loaders.py b/tests/regressiontests/templates/loaders.py
index 64a0dc6..dfe1e3e 100644
a
|
b
|
from django.template import TemplateDoesNotExist, Context
|
20 | 20 | from django.template.loaders.eggs import load_template_source as lts_egg |
21 | 21 | from django.template import loader |
22 | 22 | |
| 23 | |
23 | 24 | # Mock classes and objects for pkg_resources functions. |
24 | 25 | class MockProvider(pkg_resources.NullProvider): |
25 | 26 | def __init__(self, module): |
… |
… |
class CachedLoader(unittest.TestCase):
|
99 | 100 | ) |
100 | 101 | ), |
101 | 102 | ) |
| 103 | # Empty the cache |
| 104 | loader.template_source_loaders = None |
| 105 | |
102 | 106 | def tearDown(self): |
103 | 107 | settings.TEMPLATE_LOADERS = self.old_TEMPLATE_LOADERS |
| 108 | # Empty the cache |
| 109 | loader.template_source_loaders = None |
104 | 110 | |
105 | 111 | def test_templatedir_caching(self): |
106 | 112 | "Check that the template directories form part of the template cache key. Refs #13573" |
… |
… |
class CachedLoader(unittest.TestCase):
|
108 | 114 | t1, name = loader.find_template('test.html', (os.path.join(os.path.dirname(__file__), 'templates', 'first'),)) |
109 | 115 | # Now retrieve the same template name, but from a different directory |
110 | 116 | t2, name = loader.find_template('test.html', (os.path.join(os.path.dirname(__file__), 'templates', 'second'),)) |
111 | | |
112 | 117 | # The two templates should not have the same content |
113 | 118 | self.assertNotEqual(t1.render(Context({})), t2.render(Context({}))) |
114 | 119 | |