Commit a43c9ead by Kálmán Viktor

dashboard: fix template tester test

parent 0aa83f04
...@@ -19,9 +19,8 @@ from os import listdir ...@@ -19,9 +19,8 @@ from os import listdir
from os.path import isfile, isdir, join from os.path import isfile, isdir, join
import unittest import unittest
from django.conf import settings
from django.template import Template, Context, VariableDoesNotExist from django.template import Template, Context, VariableDoesNotExist
from django.template.loader import find_template_loader from django.template.engine import Engine
from django.core.urlresolvers import NoReverseMatch from django.core.urlresolvers import NoReverseMatch
...@@ -29,9 +28,8 @@ class TemplateSyntaxTestCase(unittest.TestCase): ...@@ -29,9 +28,8 @@ class TemplateSyntaxTestCase(unittest.TestCase):
def test_templates(self): def test_templates(self):
"""Test all templates for syntax errors.""" """Test all templates for syntax errors."""
for loader_name in settings.TEMPLATE_LOADERS: for loader in Engine.get_default().template_loaders:
print loader_name print loader
loader = find_template_loader(loader_name)
self._test_dir(loader.get_template_sources('')) self._test_dir(loader.get_template_sources(''))
def _test_dir(self, dir, path="/"): def _test_dir(self, dir, path="/"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment