summaryrefslogtreecommitdiff
path: root/tests/template_tests/syntax_tests/test_include.py
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2018-03-24 21:38:20 +0100
committerTim Graham <timograham@gmail.com>2018-03-24 19:56:46 -0400
commit4554f9a783665d64b59c35b53ae71178e56ac783 (patch)
tree4281fbf14ba20f51fcc846441ccf86f72fe56e5f /tests/template_tests/syntax_tests/test_include.py
parent623117d1f1d7866b7321f0e73a6c497bb3b3cb01 (diff)
Increased test coverage for various template tags.
Diffstat (limited to 'tests/template_tests/syntax_tests/test_include.py')
-rw-r--r--tests/template_tests/syntax_tests/test_include.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/template_tests/syntax_tests/test_include.py b/tests/template_tests/syntax_tests/test_include.py
index ca98e09771..8587639674 100644
--- a/tests/template_tests/syntax_tests/test_include.py
+++ b/tests/template_tests/syntax_tests/test_include.py
@@ -182,6 +182,15 @@ class IncludeTagTests(SimpleTestCase):
with self.assertRaises(TemplateSyntaxError):
template.render(context)
+ @setup({'include_empty': '{% include %}'})
+ def test_include_empty(self):
+ msg = (
+ "'include' tag takes at least one argument: the name of the "
+ "template to be included."
+ )
+ with self.assertRaisesMessage(TemplateSyntaxError, msg):
+ self.engine.get_template('include_empty')
+
class IncludeTests(SimpleTestCase):