Skip to content

Commit 53d68af

Browse files
committed
Adapted the utils template tests to the new template handling in Django 1.8.
- Legacy-Id: 12407
1 parent 554ec2d commit 53d68af

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ietf/utils/tests.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
from django.conf import settings
1515
from django.core.management import call_command
16-
from django.template import Context
16+
from django.template import Context, engines
1717
from django.template.defaulttags import URLNode
18+
from django.template.loader import get_template
1819
from django.templatetags.static import StaticNode
19-
from django.template.loaders.filesystem import Loader
2020
from django.test import TestCase
2121

2222
import 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:

0 commit comments

Comments
 (0)