Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #17948 -- Isolated auth tests from custom template loaders

Thanks andrey@kostenko.name for the report.
  • Loading branch information...
commit c7f44ae085df3a270aa998cdedb56f36900cb9ef 1 parent b1fb6f4
Claude Paroz authored
5  django/contrib/auth/tests/views.py
... ...
@@ -1,7 +1,7 @@
1 1
 import os
2 2
 import re
3 3
 
4  
-from django.conf import settings
  4
+from django.conf import global_settings, settings
5 5
 from django.contrib.sites.models import Site, RequestSite
6 6
 from django.contrib.auth.models import User
7 7
 from django.core import mail
@@ -23,7 +23,8 @@
23 23
         ('en', 'English'),
24 24
     ),
25 25
     LANGUAGE_CODE='en',
26  
-    TEMPLATE_DIRS = (
  26
+    TEMPLATE_LOADERS=global_settings.TEMPLATE_LOADERS,
  27
+    TEMPLATE_DIRS=(
27 28
         os.path.join(os.path.dirname(__file__), 'templates'),
28 29
     ),
29 30
     USE_TZ=False,
7  django/test/signals.py
@@ -52,6 +52,13 @@ def clear_context_processors_cache(**kwargs):
52 52
 
53 53
 
54 54
 @receiver(setting_changed)
  55
+def clear_template_loaders_cache(**kwargs):
  56
+    if kwargs['setting'] == 'TEMPLATE_LOADERS':
  57
+        from django.template import loader
  58
+        loader.template_source_loaders = None
  59
+
  60
+
  61
+@receiver(setting_changed)
55 62
 def clear_serializers_cache(**kwargs):
56 63
     if kwargs['setting'] == 'SERIALIZATION_MODULES':
57 64
         from django.core import serializers

0 notes on commit c7f44ae

Please sign in to comment.
Something went wrong with that request. Please try again.