diff options
| author | Tim Graham <timograham@gmail.com> | 2017-01-20 08:01:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-20 08:01:02 -0500 |
| commit | 4e729feaa647547f25debb1cb63dec989dc41a20 (patch) | |
| tree | 7c7a38c5961bf4daf98a8cb47dc74c769563ffcf /tests/model_forms/tests.py | |
| parent | ec4c1d6717da7a9d09d5b3ce84cccac819bb592c (diff) | |
Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
Diffstat (limited to 'tests/model_forms/tests.py')
| -rw-r--r-- | tests/model_forms/tests.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index 108c917587..3c8f7ed108 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -17,7 +17,6 @@ from django.forms.models import ( ) from django.template import Context, Template from django.test import SimpleTestCase, TestCase, skipUnlessDBFeature -from django.utils._os import upath from .models import ( Article, ArticleStatus, Author, Author1, Award, BetterWriter, BigInt, Book, @@ -2221,7 +2220,7 @@ class FileAndImageFieldTests(TestCase): fields = '__all__' # Grab an image for testing. - filename = os.path.join(os.path.dirname(upath(__file__)), "test.png") + filename = os.path.join(os.path.dirname(__file__), 'test.png') with open(filename, "rb") as fp: img = fp.read() @@ -2260,9 +2259,9 @@ class FileAndImageFieldTests(TestCase): # it comes to validation. This specifically tests that #6302 is fixed for # both file fields and image fields. - with open(os.path.join(os.path.dirname(upath(__file__)), "test.png"), 'rb') as fp: + with open(os.path.join(os.path.dirname(__file__), 'test.png'), 'rb') as fp: image_data = fp.read() - with open(os.path.join(os.path.dirname(upath(__file__)), "test2.png"), 'rb') as fp: + with open(os.path.join(os.path.dirname(__file__), 'test2.png'), 'rb') as fp: image_data2 = fp.read() f = ImageFileForm( |
