diff --git a/tests/view_tests/tests/test_defaults.py b/tests/view_tests/tests/test_defaults.py index b36d5b5b584..c34f38a8ca3 100644 --- a/tests/view_tests/tests/test_defaults.py +++ b/tests/view_tests/tests/test_defaults.py @@ -72,6 +72,13 @@ class DefaultsTests(TestCase): response = self.client.get('/server_error/') self.assertEqual(response.status_code, 500) + def test_bad_request(self): + rf = RequestFactory() + request = rf.get('/') + response = bad_request(request, Exception()) + self.assertEqual(response.status_code, 400) + self.assertEqual(response.content, b'