diff options
| author | Ad Timmering <awtimmering@gmail.com> | 2022-01-05 11:44:13 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-01-05 11:46:26 +0100 |
| commit | e700a3714fe668157e5f84ddabfd32d6aac08079 (patch) | |
| tree | b76b2bd7ddc6478476ec28d2c73e3eeedd461e99 /django/test | |
| parent | f5233dce309543c826224be9dfa9c9f4f855f73c (diff) | |
Refs #33400 -- Renamed SimpleTestCase._assert_template_used() to _get_template_used().
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/testcases.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index ddd9fe3c7f..367076d1a9 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -625,7 +625,7 @@ class SimpleTestCase(unittest.TestCase): if not found_formset: self.fail(msg_prefix + "The formset '%s' was not used to render the response" % formset) - def _assert_template_used(self, response, template_name, msg_prefix, method_name): + def _get_template_used(self, response, template_name, msg_prefix, method_name): if response is None and template_name is None: raise TypeError('response and/or template_name argument must be provided') @@ -651,7 +651,7 @@ class SimpleTestCase(unittest.TestCase): Assert that the template with the provided name was used in rendering the response. Also usable as context manager. """ - context_mgr_template, template_names, msg_prefix = self._assert_template_used( + context_mgr_template, template_names, msg_prefix = self._get_template_used( response, template_name, msg_prefix, 'assertTemplateUsed', ) if context_mgr_template: @@ -680,7 +680,7 @@ class SimpleTestCase(unittest.TestCase): Assert that the template with the provided name was NOT used in rendering the response. Also usable as context manager. """ - context_mgr_template, template_names, msg_prefix = self._assert_template_used( + context_mgr_template, template_names, msg_prefix = self._get_template_used( response, template_name, msg_prefix, 'assertTemplateNotUsed', ) if context_mgr_template: |
