mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Switched to Python 3-compatible octal notation.
This commit is contained in:
parent
85cd458944
commit
324d48d0a7
4 changed files with 10 additions and 10 deletions
|
@ -362,16 +362,16 @@ class DirectoryCreationTests(unittest.TestCase):
|
|||
if not os.path.isdir(temp_storage.location):
|
||||
os.makedirs(temp_storage.location)
|
||||
if os.path.isdir(UPLOAD_TO):
|
||||
os.chmod(UPLOAD_TO, 0700)
|
||||
os.chmod(UPLOAD_TO, 0o700)
|
||||
shutil.rmtree(UPLOAD_TO)
|
||||
|
||||
def tearDown(self):
|
||||
os.chmod(temp_storage.location, 0700)
|
||||
os.chmod(temp_storage.location, 0o700)
|
||||
shutil.rmtree(temp_storage.location)
|
||||
|
||||
def test_readonly_root(self):
|
||||
"""Permission errors are not swallowed"""
|
||||
os.chmod(temp_storage.location, 0500)
|
||||
os.chmod(temp_storage.location, 0o500)
|
||||
try:
|
||||
self.obj.testfile.save('foo.txt', SimpleUploadedFile('foo.txt', b'x'))
|
||||
except OSError as err:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue