1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Increased test coverage for various template tags.

This commit is contained in:
Mads Jensen
2018-03-24 21:38:20 +01:00
committed by Tim Graham
parent 623117d1f1
commit 4554f9a783
6 changed files with 70 additions and 10 deletions

View File

@@ -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):