summaryrefslogtreecommitdiff
path: root/tests/auth_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auth_tests')
-rw-r--r--tests/auth_tests/settings.py4
-rw-r--r--tests/auth_tests/test_validators.py3
2 files changed, 2 insertions, 5 deletions
diff --git a/tests/auth_tests/settings.py b/tests/auth_tests/settings.py
index 8c295387c4..9fd71dfe87 100644
--- a/tests/auth_tests/settings.py
+++ b/tests/auth_tests/settings.py
@@ -1,7 +1,5 @@
import os
-from django.utils._os import upath
-
AUTH_MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
@@ -9,7 +7,7 @@ AUTH_MIDDLEWARE = [
AUTH_TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [os.path.join(os.path.dirname(upath(__file__)), 'templates')],
+ 'DIRS': [os.path.join(os.path.dirname(__file__), 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
diff --git a/tests/auth_tests/test_validators.py b/tests/auth_tests/test_validators.py
index 19d75c8d30..e9dc1f7f3f 100644
--- a/tests/auth_tests/test_validators.py
+++ b/tests/auth_tests/test_validators.py
@@ -13,7 +13,6 @@ from django.core.exceptions import ValidationError
from django.db import models
from django.test import TestCase, override_settings
from django.test.utils import isolate_apps
-from django.utils._os import upath
@override_settings(AUTH_PASSWORD_VALIDATORS=[
@@ -171,7 +170,7 @@ class CommonPasswordValidatorTest(TestCase):
self.assertEqual(cm.exception.messages, [expected_error])
def test_validate_custom_list(self):
- path = os.path.join(os.path.dirname(os.path.realpath(upath(__file__))), 'common-passwords-custom.txt')
+ path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'common-passwords-custom.txt')
validator = CommonPasswordValidator(password_list_path=path)
expected_error = "This password is too common."
self.assertIsNone(validator.validate('a-safe-password'))