summaryrefslogtreecommitdiff
path: root/tests/template_tests/test_parser.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-07 17:42:31 -0500
committerGitHub <noreply@github.com>2016-12-07 17:42:31 -0500
commitb5f0b3478dfcf0335f8ac2038d59f54b4a05f2a0 (patch)
treef3eb61bfdcf45c7b27fe3c480e9a7533746d1aad /tests/template_tests/test_parser.py
parentf909fa84bedb51778a175aadfe4cfe7a91fe06cd (diff)
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
Diffstat (limited to 'tests/template_tests/test_parser.py')
-rw-r--r--tests/template_tests/test_parser.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/template_tests/test_parser.py b/tests/template_tests/test_parser.py
index cf7cae0466..c6800f68dc 100644
--- a/tests/template_tests/test_parser.py
+++ b/tests/template_tests/test_parser.py
@@ -3,17 +3,15 @@ Testing some internals of the template processing. These are *not* examples to b
"""
from __future__ import unicode_literals
-from unittest import TestCase
-
from django.template import Library, TemplateSyntaxError
from django.template.base import (
TOKEN_BLOCK, FilterExpression, Parser, Token, Variable,
)
from django.template.defaultfilters import register as filter_library
-from django.utils import six
+from django.test import SimpleTestCase
-class ParserTests(TestCase):
+class ParserTests(SimpleTestCase):
def test_token_smart_split(self):
"""
@@ -72,7 +70,7 @@ class ParserTests(TestCase):
Variable("article._hidden")
# Variables should raise on non string type
- with six.assertRaisesRegex(self, TypeError, "Variable must be a string or number, got <(class|type) 'dict'>"):
+ with self.assertRaisesRegex(TypeError, "Variable must be a string or number, got <(class|type) 'dict'>"):
Variable({})
def test_filter_args_count(self):