mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #30137 -- Replaced OSError aliases with the canonical OSError.
Used more specific errors (e.g. FileExistsError) as appropriate.
This commit is contained in:
parent
7444f32527
commit
7785e03ba8
33 changed files with 60 additions and 69 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue