summaryrefslogtreecommitdiff
path: root/tests/regressiontests/model_fields/imagefield.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-12-08 11:13:52 +0100
committerClaude Paroz <claude@2xlibre.net>2012-12-08 11:13:52 +0100
commitc91667338a4e774e2819ccf4da852dc7b759bc19 (patch)
tree42a700d237c85ac2b647999d02d3dcd7d8047068 /tests/regressiontests/model_fields/imagefield.py
parent53b879f045f0e55cc8f4bedff67b5a14f3057561 (diff)
Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
Diffstat (limited to 'tests/regressiontests/model_fields/imagefield.py')
-rw-r--r--tests/regressiontests/model_fields/imagefield.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/regressiontests/model_fields/imagefield.py b/tests/regressiontests/model_fields/imagefield.py
index 7446f222ff..df0215db3d 100644
--- a/tests/regressiontests/model_fields/imagefield.py
+++ b/tests/regressiontests/model_fields/imagefield.py
@@ -6,6 +6,7 @@ import shutil
from django.core.files import File
from django.core.files.images import ImageFile
from django.test import TestCase
+from django.utils._os import upath
from django.utils.unittest import skipIf
from .models import Image
@@ -43,10 +44,10 @@ class ImageFieldTestMixin(object):
shutil.rmtree(temp_storage_dir)
os.mkdir(temp_storage_dir)
- file_path1 = os.path.join(os.path.dirname(__file__), "4x8.png")
+ file_path1 = os.path.join(os.path.dirname(upath(__file__)), "4x8.png")
self.file1 = self.File(open(file_path1, 'rb'))
- file_path2 = os.path.join(os.path.dirname(__file__), "8x4.png")
+ file_path2 = os.path.join(os.path.dirname(upath(__file__)), "8x4.png")
self.file2 = self.File(open(file_path2, 'rb'))
def tearDown(self):