mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +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
|
@ -424,7 +424,7 @@ class FileSaveRaceConditionTest(unittest.TestCase):
|
|||
class FileStoragePermissions(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.old_perms = settings.FILE_UPLOAD_PERMISSIONS
|
||||
settings.FILE_UPLOAD_PERMISSIONS = 0666
|
||||
settings.FILE_UPLOAD_PERMISSIONS = 0o666
|
||||
self.storage_dir = tempfile.mkdtemp()
|
||||
self.storage = FileSystemStorage(self.storage_dir)
|
||||
|
||||
|
@ -434,8 +434,8 @@ class FileStoragePermissions(unittest.TestCase):
|
|||
|
||||
def test_file_upload_permissions(self):
|
||||
name = self.storage.save("the_file", ContentFile(b"data"))
|
||||
actual_mode = os.stat(self.storage.path(name))[0] & 0777
|
||||
self.assertEqual(actual_mode, 0666)
|
||||
actual_mode = os.stat(self.storage.path(name))[0] & 0o777
|
||||
self.assertEqual(actual_mode, 0o666)
|
||||
|
||||
|
||||
class FileStoragePathParsing(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue