mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
This commit is contained in:
parent
ec4c1d6717
commit
4e729feaa6
64 changed files with 108 additions and 178 deletions
|
|
@ -7,7 +7,6 @@ from django.core.files import File
|
|||
from django.core.files.images import ImageFile
|
||||
from django.test import TestCase
|
||||
from django.test.testcases import SerializeMixin
|
||||
from django.utils._os import upath
|
||||
|
||||
try:
|
||||
from .models import Image
|
||||
|
|
@ -51,10 +50,10 @@ class ImageFieldTestMixin(SerializeMixin):
|
|||
shutil.rmtree(temp_storage_dir)
|
||||
os.mkdir(temp_storage_dir)
|
||||
|
||||
file_path1 = os.path.join(os.path.dirname(upath(__file__)), "4x8.png")
|
||||
file_path1 = os.path.join(os.path.dirname(__file__), '4x8.png')
|
||||
self.file1 = self.File(open(file_path1, 'rb'), name='4x8.png')
|
||||
|
||||
file_path2 = os.path.join(os.path.dirname(upath(__file__)), "8x4.png")
|
||||
file_path2 = os.path.join(os.path.dirname(__file__), '8x4.png')
|
||||
self.file2 = self.File(open(file_path2, 'rb'), name='8x4.png')
|
||||
|
||||
def tearDown(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue