Commit cd914e31 authored by Anubhav Joshi's avatar Anubhav Joshi Committed by Tim Graham
Browse files

Fixed #21977 -- Deprecated SimpleTestCase.urls

parent d2f4553d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ class PermWrapperTests(TestCase):
    TEMPLATE_DIRS=(
        os.path.join(os.path.dirname(upath(__file__)), 'templates'),
    ),
    ROOT_URLCONF='django.contrib.auth.tests.urls',
    USE_TZ=False,                           # required for loading the fixture
    PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
)
@@ -73,7 +74,6 @@ class AuthContextProcessorTests(TestCase):
    """
    Tests for the ``django.contrib.auth.context_processors.auth`` processor
    """
    urls = 'django.contrib.auth.tests.urls'
    fixtures = ['context-processors-users.xml']

    @override_settings(
+2 −2
Original line number Diff line number Diff line
@@ -5,16 +5,16 @@ from django.contrib.auth.tests.test_views import AuthViewsTestCase
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.core.exceptions import PermissionDenied
from django.http import HttpResponse
from django.test import TestCase
from django.test import TestCase, override_settings
from django.test.client import RequestFactory


@skipIfCustomUser
@override_settings(ROOT_URLCONF='django.contrib.auth.tests.urls')
class LoginRequiredTestCase(AuthViewsTestCase):
    """
    Tests the login_required decorators
    """
    urls = 'django.contrib.auth.tests.urls'

    def testCallable(self):
        """
+2 −2
Original line number Diff line number Diff line
@@ -6,14 +6,14 @@ from django.contrib.auth.backends import RemoteUserBackend
from django.contrib.auth.middleware import RemoteUserMiddleware
from django.contrib.auth.models import User
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.test import TestCase
from django.test import TestCase, override_settings
from django.utils import timezone


@skipIfCustomUser
@override_settings(ROOT_URLCONF='django.contrib.auth.tests.urls')
class RemoteUserTest(TestCase):

    urls = 'django.contrib.auth.tests.urls'
    middleware = 'django.contrib.auth.middleware.RemoteUserMiddleware'
    backend = 'django.contrib.auth.backends.RemoteUserBackend'
    header = 'REMOTE_USER'
+3 −2
Original line number Diff line number Diff line
@@ -7,9 +7,10 @@ from django.test import override_settings


@skipIfCustomUser
@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
@override_settings(USE_TZ=False,
    PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
    ROOT_URLCONF='django.contrib.auth.tests.urls')
class SignalTestCase(TestCase):
    urls = 'django.contrib.auth.tests.urls'
    fixtures = ['authtestdata.json']

    def listener_login(self, user, **kwargs):
+1 −1
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@ from django.utils.http import urlsafe_base64_encode
@skipIfCustomUser
@override_settings(
    PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
    ROOT_URLCONF='django.contrib.auth.tests.urls',
)
class AuthTemplateTests(TestCase):
    urls = 'django.contrib.auth.tests.urls'

    def test_titles(self):
        rf = RequestFactory()
Loading