Assert that error is found in response.context['form'] errors
(self, response, error)
| 94 | self.assertNotIn(SESSION_KEY, self.client.session) |
| 95 | |
| 96 | def assertFormError(self, response, error): |
| 97 | """Assert that error is found in response.context['form'] errors""" |
| 98 | form_errors = list(itertools.chain(*response.context["form"].errors.values())) |
| 99 | self.assertIn(str(error), form_errors) |
| 100 | |
| 101 | |
| 102 | @override_settings(ROOT_URLCONF="django.contrib.auth.urls") |
no test coverage detected