浏览代码

Fixed #22184 -- Allowed template_tests.tests to be run isolated

Anubhav Joshi 11 年之前
父节点
当前提交
659b5678fc
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      tests/template_tests/tests.py

+ 2 - 0
tests/template_tests/tests.py

@@ -641,6 +641,8 @@ class TemplateTests(TestCase):
     def get_template_tests(self):
         # SYNTAX --
         # 'template_name': ('template contents', 'context dict', 'expected string output' or Exception class)
+        # This import is necessary when tests are run isolated:
+        from .templatetags import custom
         basedir = os.path.dirname(os.path.abspath(upath(__file__)))
         tests = {
             ### BASIC SYNTAX ################################################