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/apps | |
parent | ec4c1d6717da7a9d09d5b3ce84cccac819bb592c (diff) | |
download | django-4e729feaa647547f25debb1cb63dec989dc41a20.tar.gz |
Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
Diffstat (limited to 'tests/apps')
-rw-r--r-- | tests/apps/namespace_package_base/nsapp/apps.py | 3 | ||||
-rw-r--r-- | tests/apps/tests.py | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/apps/namespace_package_base/nsapp/apps.py b/tests/apps/namespace_package_base/nsapp/apps.py index 3e864ae5b4..a878449bf9 100644 --- a/tests/apps/namespace_package_base/nsapp/apps.py +++ b/tests/apps/namespace_package_base/nsapp/apps.py @@ -1,9 +1,8 @@ import os from django.apps import AppConfig -from django.utils._os import upath class NSAppConfig(AppConfig): name = 'nsapp' - path = upath(os.path.dirname(__file__)) + path = os.path.dirname(__file__) diff --git a/tests/apps/tests.py b/tests/apps/tests.py index 0263af897f..76bac55a83 100644 --- a/tests/apps/tests.py +++ b/tests/apps/tests.py @@ -7,7 +7,6 @@ from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured from django.db import models from django.test import SimpleTestCase, override_settings from django.test.utils import extend_sys_path, isolate_apps -from django.utils._os import upath from .default_config_app.apps import CustomConfig from .models import SoAlternative, TotallyNormal, new_apps @@ -29,7 +28,7 @@ SOME_INSTALLED_APPS_NAMES = [ 'django.contrib.auth', ] + SOME_INSTALLED_APPS[2:] -HERE = os.path.dirname(upath(__file__)) +HERE = os.path.dirname(__file__) class AppsTests(SimpleTestCase): @@ -385,7 +384,7 @@ class NamespacePackageAppTests(SimpleTestCase): with extend_sys_path(self.base_location): with self.settings(INSTALLED_APPS=['nsapp']): app_config = apps.get_app_config('nsapp') - self.assertEqual(app_config.path, upath(self.app_path)) + self.assertEqual(app_config.path, self.app_path) def test_multiple_paths(self): """ @@ -410,4 +409,4 @@ class NamespacePackageAppTests(SimpleTestCase): with extend_sys_path(self.base_location, self.other_location): with self.settings(INSTALLED_APPS=['nsapp.apps.NSAppConfig']): app_config = apps.get_app_config('nsapp') - self.assertEqual(app_config.path, upath(self.app_path)) + self.assertEqual(app_config.path, self.app_path) |