mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #26601 -- Deprecated old-style middleware.
This commit is contained in:
@@ -3,6 +3,8 @@ from django.contrib.auth.models import User
|
||||
from django.contrib.flatpages.models import FlatPage
|
||||
from django.contrib.sites.models import Site
|
||||
from django.test import TestCase, modify_settings, override_settings
|
||||
from django.test.utils import ignore_warnings
|
||||
from django.utils.deprecation import RemovedInDjango20Warning
|
||||
|
||||
from .settings import FLATPAGES_TEMPLATES
|
||||
|
||||
@@ -107,6 +109,7 @@ class FlatpageMiddlewareTests(TestDataMixin, TestCase):
|
||||
self.assertContains(response, "<p>Isn't it special!</p>")
|
||||
|
||||
|
||||
@ignore_warnings(category=RemovedInDjango20Warning)
|
||||
@override_settings(
|
||||
MIDDLEWARE=None,
|
||||
MIDDLEWARE_CLASSES=[
|
||||
@@ -189,6 +192,7 @@ class FlatpageMiddlewareAppendSlashTests(TestDataMixin, TestCase):
|
||||
self.assertContains(response, "<p>Root</p>")
|
||||
|
||||
|
||||
@ignore_warnings(category=RemovedInDjango20Warning)
|
||||
@override_settings(
|
||||
MIDDLEWARE=None,
|
||||
MIDDLEWARE_CLASSES=[
|
||||
|
||||
Reference in New Issue
Block a user