summaryrefslogtreecommitdiff
path: root/tests/generic_views/test_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/generic_views/test_base.py')
-rw-r--r--tests/generic_views/test_base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/generic_views/test_base.py b/tests/generic_views/test_base.py
index 8215e67e1a..1579408712 100644
--- a/tests/generic_views/test_base.py
+++ b/tests/generic_views/test_base.py
@@ -273,7 +273,11 @@ class TemplateViewTest(SimpleTestCase):
"""
A template view must provide a template name.
"""
- with self.assertRaises(ImproperlyConfigured):
+ msg = (
+ "TemplateResponseMixin requires either a definition of "
+ "'template_name' or an implementation of 'get_template_names()'"
+ )
+ with self.assertRaisesMessage(ImproperlyConfigured, msg):
self.client.get('/template/no_template/')
@require_jinja2