File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414from django .conf import settings
1515from django .core .management import call_command
16- from django .template import Context
16+ from django .template import Context , engines
1717from django .template .defaulttags import URLNode
18+ from django .template .loader import get_template
1819from django .templatetags .static import StaticNode
19- from django .template .loaders .filesystem import Loader
2020from django .test import TestCase
2121
2222import debug # pyflakes:ignore
@@ -109,12 +109,12 @@ class TemplateChecksTestCase(TestCase):
109109 templates = {}
110110
111111 def setUp (self ):
112- self .loader = Loader ()
113112 self .paths = list (get_template_paths ())
114113 self .paths .sort ()
114+ self .engine = engines ['django' ]
115115 for path in self .paths :
116116 try :
117- self .templates [path ], _ = self . loader . load_template (path )
117+ self .templates [path ] = get_template (path ). template
118118 except Exception :
119119 pass
120120
@@ -126,7 +126,7 @@ def test_parse_templates(self):
126126 for path in self .paths :
127127 if not path in self .templates :
128128 try :
129- self . loader . load_template (path )
129+ get_template (path )
130130 except Exception as e :
131131 errors .append ((path , e ))
132132 if errors :
You can’t perform that action at this time.
0 commit comments