diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-06-29 18:34:41 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-06-29 18:49:37 +0200 |
| commit | acd7b34aafe352ef604edcb73f75041c5cbba6b9 (patch) | |
| tree | eecb1df66a2070e9a357380fba89febd38c488f4 /tests/middleware | |
| parent | 8b9b8d3bda09eb1b447631182d06c6c5e51425f6 (diff) | |
Advanced deprecation warnings for Django 1.7.
Diffstat (limited to 'tests/middleware')
| -rw-r--r-- | tests/middleware/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/middleware/tests.py b/tests/middleware/tests.py index 20645cf91f..f3165f939f 100644 --- a/tests/middleware/tests.py +++ b/tests/middleware/tests.py @@ -18,7 +18,7 @@ from django.middleware.http import ConditionalGetMiddleware from django.middleware.gzip import GZipMiddleware from django.middleware.transaction import TransactionMiddleware from django.test import TransactionTestCase, TestCase, RequestFactory -from django.test.utils import override_settings, IgnorePendingDeprecationWarningsMixin +from django.test.utils import override_settings, IgnoreDeprecationWarningsMixin from django.utils import six from django.utils.encoding import force_str from django.utils.six.moves import xrange @@ -249,7 +249,7 @@ class CommonMiddlewareTest(TestCase): request = self._get_request('regular_url/that/does/not/exist') request.META['HTTP_REFERER'] = '/another/url/' with warnings.catch_warnings(): - warnings.simplefilter("ignore", PendingDeprecationWarning) + warnings.simplefilter("ignore", DeprecationWarning) response = self.client.get(request.path) CommonMiddleware().process_response(request, response) self.assertEqual(len(mail.outbox), 1) @@ -261,7 +261,7 @@ class CommonMiddlewareTest(TestCase): def test_404_error_reporting_no_referer(self): request = self._get_request('regular_url/that/does/not/exist') with warnings.catch_warnings(): - warnings.simplefilter("ignore", PendingDeprecationWarning) + warnings.simplefilter("ignore", DeprecationWarning) response = self.client.get(request.path) CommonMiddleware().process_response(request, response) self.assertEqual(len(mail.outbox), 0) @@ -273,7 +273,7 @@ class CommonMiddlewareTest(TestCase): request = self._get_request('foo_url/that/does/not/exist/either') request.META['HTTP_REFERER'] = '/another/url/' with warnings.catch_warnings(): - warnings.simplefilter("ignore", PendingDeprecationWarning) + warnings.simplefilter("ignore", DeprecationWarning) response = self.client.get(request.path) CommonMiddleware().process_response(request, response) self.assertEqual(len(mail.outbox), 0) @@ -703,7 +703,7 @@ class ETagGZipMiddlewareTest(TestCase): self.assertNotEqual(gzip_etag, nogzip_etag) -class TransactionMiddlewareTest(IgnorePendingDeprecationWarningsMixin, TransactionTestCase): +class TransactionMiddlewareTest(IgnoreDeprecationWarningsMixin, TransactionTestCase): """ Test the transaction middleware. """ |
