File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ def test_readonly_root(self):
533533 os .chmod (MEDIA_ROOT , 0o500 )
534534 self .addCleanup (os .chmod , MEDIA_ROOT , 0o700 )
535535 try :
536- self .obj .testfile .save ('foo.txt' , SimpleUploadedFile ('foo.txt' , b'x' ))
536+ self .obj .testfile .save ('foo.txt' , SimpleUploadedFile ('foo.txt' , b'x' ), save = False )
537537 except OSError as err :
538538 self .assertEqual (err .errno , errno .EACCES )
539539 except Exception :
@@ -546,7 +546,7 @@ def test_not_a_directory(self):
546546 self .addCleanup (os .remove , UPLOAD_TO )
547547 with self .assertRaises (IOError ) as exc_info :
548548 with SimpleUploadedFile ('foo.txt' , b'x' ) as file :
549- self .obj .testfile .save ('foo.txt' , file )
549+ self .obj .testfile .save ('foo.txt' , file , save = False )
550550 # The test needs to be done on a specific string as IOError
551551 # is raised even without the patch (just not early enough)
552552 self .assertEqual (exc_info .exception .args [0 ],
You can’t perform that action at this time.
0 commit comments