summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-02-14 19:47:07 -0500
committerTim Graham <timograham@gmail.com>2015-02-17 19:03:03 -0500
commit307c0f299a6c26f5231d3516df5b4edc54b36553 (patch)
tree3c80c8cb475846c0dff45188db1db111249df97f /tests/admin_scripts/tests.py
parentfa66ea75326e669cd3d51fb926a4364b8ba08959 (diff)
downloaddjango-307c0f299a6c26f5231d3516df5b4edc54b36553.tar.gz
Refs #24324 -- Fixed Python 2 test failures when path to Django source contains non-ASCII characters.
Diffstat (limited to 'tests/admin_scripts/tests.py')
-rw-r--r--tests/admin_scripts/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 151498cc26..a031313cf8 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -32,7 +32,7 @@ if not os.path.exists(test_dir):
os.mkdir(test_dir)
open(os.path.join(test_dir, '__init__.py'), 'w').close()
-custom_templates_dir = os.path.join(os.path.dirname(__file__), 'custom_templates')
+custom_templates_dir = os.path.join(os.path.dirname(upath(__file__)), 'custom_templates')
SYSTEM_CHECK_MSG = 'System check identified no issues'
@@ -113,7 +113,7 @@ class AdminScriptTestCase(unittest.TestCase):
def run_test(self, script, args, settings_file=None, apps=None):
base_dir = os.path.dirname(test_dir)
# The base dir for Django's tests is one level up.
- tests_dir = os.path.dirname(os.path.dirname(__file__))
+ tests_dir = os.path.dirname(os.path.dirname(upath(__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.