mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user