1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Moved contrib.redirects tests out of contrib.

This commit is contained in:
Tim Graham 2015-02-10 08:41:45 -05:00
parent b3cd9e0d07
commit 00da46091a
3 changed files with 5 additions and 4 deletions

View File

View File

@ -1,13 +1,12 @@
from django import http from django import http
from django.conf import settings from django.conf import settings
from django.contrib.redirects.middleware import RedirectFallbackMiddleware
from django.contrib.redirects.models import Redirect
from django.contrib.sites.models import Site from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase, modify_settings, override_settings from django.test import TestCase, modify_settings, override_settings
from django.utils import six from django.utils import six
from .middleware import RedirectFallbackMiddleware
from .models import Redirect
@modify_settings(MIDDLEWARE_CLASSES={'append': @modify_settings(MIDDLEWARE_CLASSES={'append':
'django.contrib.redirects.middleware.RedirectFallbackMiddleware'}) 'django.contrib.redirects.middleware.RedirectFallbackMiddleware'})
@ -65,7 +64,7 @@ class OverriddenRedirectFallbackMiddleware(RedirectFallbackMiddleware):
@modify_settings(MIDDLEWARE_CLASSES={'append': @modify_settings(MIDDLEWARE_CLASSES={'append':
'django.contrib.redirects.tests.OverriddenRedirectFallbackMiddleware'}) 'redirects_tests.tests.OverriddenRedirectFallbackMiddleware'})
@override_settings(SITE_ID=1) @override_settings(SITE_ID=1)
class OverriddenRedirectMiddlewareTests(TestCase): class OverriddenRedirectMiddlewareTests(TestCase):

View File

@ -66,6 +66,7 @@ ALWAYS_MIDDLEWARE_CLASSES = [
# before its application was loaded." # before its application was loaded."
CONTRIB_TESTS_TO_APPS = { CONTRIB_TESTS_TO_APPS = {
'flatpages_tests': 'django.contrib.flatpages', 'flatpages_tests': 'django.contrib.flatpages',
'redirects_tests': 'django.contrib.redirects',
} }
@ -149,6 +150,7 @@ def setup(verbosity, test_labels):
'auth': 'django.contrib.auth.tests.migrations', 'auth': 'django.contrib.auth.tests.migrations',
'contenttypes': 'django.contrib.contenttypes.tests.migrations', 'contenttypes': 'django.contrib.contenttypes.tests.migrations',
'flatpages_tests': 'django.contrib.flatpages.migrations', 'flatpages_tests': 'django.contrib.flatpages.migrations',
'redirects_tests': 'django.contrib.redirects.migrations',
} }
if verbosity > 0: if verbosity > 0: