Fixed #30137 -- Replaced OSError aliases with the canonical OSError.

Used more specific errors (e.g. FileExistsError) as appropriate.
This commit is contained in:
Jon Dufresne 2019-01-28 07:01:35 -08:00 committed by Tim Graham
parent 7444f32527
commit 7785e03ba8
33 changed files with 60 additions and 69 deletions

View file

@ -482,9 +482,9 @@ class FileStorageTests(SimpleTestCase):
f1 = ContentFile('chunks fails')
def failing_chunks():
raise IOError
raise OSError
f1.chunks = failing_chunks
with self.assertRaises(IOError):
with self.assertRaises(OSError):
self.storage.save('error.file', f1)
def test_delete_no_name(self):