summaryrefslogtreecommitdiff
path: root/tests/file_uploads
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2015-05-25 19:09:01 -0400
committerSimon Charette <charette.s@gmail.com>2015-05-25 19:09:01 -0400
commit4ccfc4439a7add24f8db4ef3960d02ef8ae09887 (patch)
tree37a5155b5f12dc2c32021fa50cd18e3998d3ece0 /tests/file_uploads
parentd73176a84273c06fa11075c65293ec28497a8423 (diff)
Refs #24652 -- Fixed a test failure in file_uploads tests on Windows.
Thanks to Tim Graham for the report.
Diffstat (limited to 'tests/file_uploads')
-rw-r--r--tests/file_uploads/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py
index c7e627aeb0..e6814aacdf 100644
--- a/tests/file_uploads/tests.py
+++ b/tests/file_uploads/tests.py
@@ -533,7 +533,7 @@ class DirectoryCreationTests(SimpleTestCase):
os.chmod(MEDIA_ROOT, 0o500)
self.addCleanup(os.chmod, MEDIA_ROOT, 0o700)
try:
- self.obj.testfile.save('foo.txt', SimpleUploadedFile('foo.txt', b'x'))
+ self.obj.testfile.save('foo.txt', SimpleUploadedFile('foo.txt', b'x'), save=False)
except OSError as err:
self.assertEqual(err.errno, errno.EACCES)
except Exception:
@@ -546,7 +546,7 @@ class DirectoryCreationTests(SimpleTestCase):
self.addCleanup(os.remove, UPLOAD_TO)
with self.assertRaises(IOError) as exc_info:
with SimpleUploadedFile('foo.txt', b'x') as file:
- self.obj.testfile.save('foo.txt', file)
+ self.obj.testfile.save('foo.txt', file, save=False)
# The test needs to be done on a specific string as IOError
# is raised even without the patch (just not early enough)
self.assertEqual(exc_info.exception.args[0],