summaryrefslogtreecommitdiff
path: root/tests/csrf_tests/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/csrf_tests/tests.py')
-rw-r--r--tests/csrf_tests/tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/csrf_tests/tests.py b/tests/csrf_tests/tests.py
index 2c40e44ae1..59abc6da32 100644
--- a/tests/csrf_tests/tests.py
+++ b/tests/csrf_tests/tests.py
@@ -441,12 +441,12 @@ class CsrfViewMiddlewareTestMixin:
def test_post_data_read_failure(self):
"""
- #20128 -- IOErrors during POST data reading should be caught and
- treated as if the POST data wasn't there.
+ OSErrors during POST data reading are caught and treated as if the
+ POST data wasn't there (#20128).
"""
class CsrfPostRequest(HttpRequest):
"""
- HttpRequest that can raise an IOError when accessing POST data
+ HttpRequest that can raise an OSError when accessing POST data
"""
def __init__(self, token, raise_error):
super().__init__()
@@ -464,7 +464,7 @@ class CsrfViewMiddlewareTestMixin:
self.raise_error = raise_error
def _load_post_and_files(self):
- raise IOError('error reading input data')
+ raise OSError('error reading input data')
def _get_post(self):
if self.raise_error: