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):
533
533
os .chmod (MEDIA_ROOT , 0o500 )
534
534
self .addCleanup (os .chmod , MEDIA_ROOT , 0o700 )
535
535
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 )
537
537
except OSError as err :
538
538
self .assertEqual (err .errno , errno .EACCES )
539
539
except Exception :
@@ -546,7 +546,7 @@ def test_not_a_directory(self):
546
546
self .addCleanup (os .remove , UPLOAD_TO )
547
547
with self .assertRaises (IOError ) as exc_info :
548
548
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 )
550
550
# The test needs to be done on a specific string as IOError
551
551
# is raised even without the patch (just not early enough)
552
552
self .assertEqual (exc_info .exception .args [0 ],
You can’t perform that action at this time.
0 commit comments