Skip to content
Browse files

Refs #24652 -- Fixed a test failure in file_uploads tests on Windows.

Thanks to Tim Graham for the report.
  • Loading branch information...
charettes committed May 25, 2015
1 parent d73176a commit 4ccfc4439a7add24f8db4ef3960d02ef8ae09887
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/file_uploads/
@@ -533,7 +533,7 @@ def test_readonly_root(self):
os.chmod(MEDIA_ROOT, 0o500)
self.addCleanup(os.chmod, MEDIA_ROOT, 0o700)
try:'foo.txt', SimpleUploadedFile('foo.txt', b'x'))'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 @@ def test_not_a_directory(self):
self.addCleanup(os.remove, UPLOAD_TO)
with self.assertRaises(IOError) as exc_info:
with SimpleUploadedFile('foo.txt', b'x') as file:'foo.txt', file)'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)

0 comments on commit 4ccfc44

Please sign in to comment.
You can’t perform that action at this time.