diff options
| author | Andrew Miller <info@akmiller.co.uk> | 2024-12-15 21:04:29 +0000 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-12-18 13:08:14 +0100 |
| commit | 3ee4c6a27ad520d4ecc3cded260d47cbccafb144 (patch) | |
| tree | 6b40c303a597ad552204c1e56a27fa8cef4e7774 /tests/generic_views | |
| parent | 0fc6d5362bfed3e2222fa3476139126ee08a4ff9 (diff) | |
Refs #26007 -- Improved the ImproperlyConfigured error message for SingleObjectTemplateResponseMixin.get_template_names().
Diffstat (limited to 'tests/generic_views')
| -rw-r--r-- | tests/generic_views/test_base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/generic_views/test_base.py b/tests/generic_views/test_base.py index add485245a..5f3941196b 100644 --- a/tests/generic_views/test_base.py +++ b/tests/generic_views/test_base.py @@ -607,8 +607,9 @@ class SingleObjectTemplateResponseMixinTest(SimpleTestCase): """ view = views.TemplateResponseWithoutTemplate() msg = ( - "TemplateResponseMixin requires either a definition of " - "'template_name' or an implementation of 'get_template_names()'" + "SingleObjectTemplateResponseMixin requires a definition " + "of 'template_name', 'template_name_field', or 'model'; " + "or an implementation of 'get_template_names()'." ) with self.assertRaisesMessage(ImproperlyConfigured, msg): view.get_template_names() |
