summaryrefslogtreecommitdiff
path: root/tests/responses
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-01-28 07:01:35 -0800
committerTim Graham <timograham@gmail.com>2019-01-28 11:15:06 -0500
commit7785e03ba89aafbd949191f126361fb9103cb980 (patch)
tree5776f7063604285445cfcebf6efb42fd5d063f60 /tests/responses
parent7444f3252757ed4384623e5afd7dcfeef3e0c74e (diff)
downloaddjango-7785e03ba89aafbd949191f126361fb9103cb980.tar.gz
Fixed #30137 -- Replaced OSError aliases with the canonical OSError.
Used more specific errors (e.g. FileExistsError) as appropriate.
Diffstat (limited to 'tests/responses')
-rw-r--r--tests/responses/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/responses/tests.py b/tests/responses/tests.py
index 8adf092ca0..934e4dfe60 100644
--- a/tests/responses/tests.py
+++ b/tests/responses/tests.py
@@ -22,14 +22,14 @@ class HttpResponseBaseTests(SimpleTestCase):
r = HttpResponseBase()
self.assertIs(r.writable(), False)
- with self.assertRaisesMessage(IOError, 'This HttpResponseBase instance is not writable'):
+ with self.assertRaisesMessage(OSError, 'This HttpResponseBase instance is not writable'):
r.write('asdf')
- with self.assertRaisesMessage(IOError, 'This HttpResponseBase instance is not writable'):
+ with self.assertRaisesMessage(OSError, 'This HttpResponseBase instance is not writable'):
r.writelines(['asdf\n', 'qwer\n'])
def test_tell(self):
r = HttpResponseBase()
- with self.assertRaisesMessage(IOError, 'This HttpResponseBase instance cannot tell its position'):
+ with self.assertRaisesMessage(OSError, 'This HttpResponseBase instance cannot tell its position'):
r.tell()
def test_setdefault(self):