summaryrefslogtreecommitdiff
path: root/tests/template_tests
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-10-28 12:02:56 +0200
committerTim Graham <timograham@gmail.com>2014-11-03 11:56:37 -0500
commitf7969b0920c403118656f6bfec58d6454d79ef1a (patch)
tree866df7de0524251323fef2b4262e672150d95f00 /tests/template_tests
parentc0c78f1b707f825eee974c65515a837f8cf46e66 (diff)
Fixed #23620 -- Used more specific assertions in the Django test suite.
Diffstat (limited to 'tests/template_tests')
-rw-r--r--tests/template_tests/tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index ed3a019721..cfcde1d912 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -403,7 +403,7 @@ class TemplateRegressionTests(TestCase):
while tb.tb_next is not None:
tb = tb.tb_next
depth += 1
- self.assertTrue(depth > 5,
+ self.assertGreater(depth, 5,
"The traceback context was lost when reraising the traceback. See #19827")
@override_settings(DEBUG=True, TEMPLATE_DEBUG=True)
@@ -1852,8 +1852,8 @@ class TemplateTagLoading(TestCase):
try:
template.Template(ttext)
except template.TemplateSyntaxError as e:
- self.assertTrue('ImportError' in e.args[0])
- self.assertTrue('Xtemplate' in e.args[0])
+ self.assertIn('ImportError', e.args[0])
+ self.assertIn('Xtemplate', e.args[0])
def test_load_error_egg(self):
ttext = "{% load broken_egg %}"
@@ -1866,8 +1866,8 @@ class TemplateTagLoading(TestCase):
with self.settings(INSTALLED_APPS=['tagsegg']):
template.Template(ttext)
except template.TemplateSyntaxError as e:
- self.assertTrue('ImportError' in e.args[0])
- self.assertTrue('Xtemplate' in e.args[0])
+ self.assertIn('ImportError', e.args[0])
+ self.assertIn('Xtemplate', e.args[0])
def test_load_working_egg(self):
ttext = "{% load working_egg %}"