diff options
| author | Prakhar <forestlaw319@gmail.com> | 2023-11-02 15:12:53 +0530 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2023-11-07 09:09:39 -0300 |
| commit | 535f7b5c6cea54a0796d85bbe213183d50002689 (patch) | |
| tree | c9c1b09231075379b81575abfe7ec8f50afaacf9 /tests | |
| parent | 8a28e983df091d94eaba77cb82fbe3ef60a80799 (diff) | |
Fixed #34830 -- Added request to csrf_failure view's template context.
Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/view_tests/tests/test_csrf.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/view_tests/tests/test_csrf.py b/tests/view_tests/tests/test_csrf.py index ef4a50dd45..d85c1b69dd 100644 --- a/tests/view_tests/tests/test_csrf.py +++ b/tests/view_tests/tests/test_csrf.py @@ -131,3 +131,7 @@ class CsrfViewTests(SimpleTestCase): with mock.patch.object(Path, "open") as m: csrf_failure(mock.MagicMock(), mock.Mock()) m.assert_called_once_with(encoding="utf-8") + + def test_csrf_response_has_request_context_processor(self): + response = self.client.post("/") + self.assertIs(response.wsgi_request, response.context.get("request")) |
