summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_scripts/tests.py')
-rw-r--r--tests/admin_scripts/tests.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 50e034e03e..25e6487a0f 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -26,10 +26,9 @@ from django.db.migrations.recorder import MigrationRecorder
from django.test import (
LiveServerTestCase, SimpleTestCase, TestCase, mock, override_settings,
)
-from django.utils._os import npath, upath
from django.utils.encoding import force_text
-custom_templates_dir = os.path.join(os.path.dirname(upath(__file__)), 'custom_templates')
+custom_templates_dir = os.path.join(os.path.dirname(__file__), 'custom_templates')
PY36 = sys.version_info >= (3, 6)
SYSTEM_CHECK_MSG = 'System check identified no issues'
@@ -128,7 +127,7 @@ class AdminScriptTestCase(unittest.TestCase):
def run_test(self, script, args, settings_file=None, apps=None):
base_dir = os.path.dirname(self.test_dir)
# The base dir for Django's tests is one level up.
- tests_dir = os.path.dirname(os.path.dirname(upath(__file__)))
+ tests_dir = os.path.dirname(os.path.dirname(__file__))
# The base dir for Django is one level above the test dir. We don't use
# `import django` to figure that out, so we don't pick up a Django
# from site-packages or similar.
@@ -152,7 +151,7 @@ class AdminScriptTestCase(unittest.TestCase):
python_path = [base_dir, django_dir, tests_dir]
python_path.extend(ext_backend_base_dirs)
# Use native strings for better compatibility
- test_environ[str(python_path_var_name)] = npath(os.pathsep.join(python_path))
+ test_environ[str(python_path_var_name)] = os.pathsep.join(python_path)
test_environ[str('PYTHONWARNINGS')] = str('')
# Move to the test directory and run
@@ -168,7 +167,7 @@ class AdminScriptTestCase(unittest.TestCase):
return out, err
def run_django_admin(self, args, settings_file=None):
- script_dir = os.path.abspath(os.path.join(os.path.dirname(upath(django.__file__)), 'bin'))
+ script_dir = os.path.abspath(os.path.join(os.path.dirname(django.__file__), 'bin'))
return self.run_test(os.path.join(script_dir, 'django-admin.py'), args, settings_file)
def run_manage(self, args, settings_file=None):
@@ -178,7 +177,7 @@ class AdminScriptTestCase(unittest.TestCase):
except OSError:
pass
- conf_dir = os.path.dirname(upath(conf.__file__))
+ conf_dir = os.path.dirname(conf.__file__)
template_manage_py = os.path.join(conf_dir, 'project_template', 'manage.py-tpl')
test_manage_py = os.path.join(self.test_dir, 'manage.py')