diff options
| author | Tim Graham <timograham@gmail.com> | 2016-05-09 13:13:55 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-05-17 07:22:26 -0400 |
| commit | ece4d24f8e494129c098868fa792400937941fab (patch) | |
| tree | f5f2b3211ffae49375c5e7390f4ed25e07110b3b /tests/middleware_exceptions | |
| parent | 9baf692a58de78dba13aa582098781675367c329 (diff) | |
Refs #26601 -- Deprecated old-style middleware.
Diffstat (limited to 'tests/middleware_exceptions')
| -rw-r--r-- | tests/middleware_exceptions/tests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/middleware_exceptions/tests.py b/tests/middleware_exceptions/tests.py index 13b33632f8..58ac5b965f 100644 --- a/tests/middleware_exceptions/tests.py +++ b/tests/middleware_exceptions/tests.py @@ -7,8 +7,8 @@ from django.http import HttpResponse from django.template import engines from django.template.response import TemplateResponse from django.test import RequestFactory, SimpleTestCase, override_settings -from django.test.utils import patch_logger -from django.utils.deprecation import MiddlewareMixin +from django.test.utils import ignore_warnings, patch_logger +from django.utils.deprecation import MiddlewareMixin, RemovedInDjango20Warning class TestException(Exception): @@ -117,6 +117,7 @@ class NoResponseMiddleware(TestMiddleware): super(NoResponseMiddleware, self).process_response(request, response) +@ignore_warnings(category=RemovedInDjango20Warning) @override_settings( ROOT_URLCONF='middleware_exceptions.urls', MIDDLEWARE_CLASSES=['django.middleware.common.CommonMiddleware'], @@ -929,6 +930,7 @@ class MiddlewareNotUsedTests(SimpleTestCase): self.assertEqual(len(calls), 0) +@ignore_warnings(category=RemovedInDjango20Warning) @override_settings( MIDDLEWARE_CLASSES=['django.middleware.common.CommonMiddleware'], MIDDLEWARE=None, |
