mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #18042 -- Advanced deprecation warnings.
Thanks Ramiro for the patch.
This commit is contained in:
parent
227cec686e
commit
e84f79f051
27 changed files with 75 additions and 38 deletions
6
tests/regressiontests/cache/tests.py
vendored
6
tests/regressiontests/cache/tests.py
vendored
|
@ -1442,12 +1442,18 @@ def hello_world_view(request, value):
|
|||
)
|
||||
class CacheMiddlewareTest(TestCase):
|
||||
|
||||
# The following tests will need to be modified in Django 1.6 to not use
|
||||
# deprecated ways of using the cache_page decorator that will be removed in
|
||||
# such version
|
||||
def setUp(self):
|
||||
self.factory = RequestFactory()
|
||||
self.default_cache = get_cache('default')
|
||||
self.other_cache = get_cache('other')
|
||||
self.save_warnings_state()
|
||||
warnings.filterwarnings('ignore', category=DeprecationWarning, module='django.views.decorators.cache')
|
||||
|
||||
def tearDown(self):
|
||||
self.restore_warnings_state()
|
||||
self.default_cache.clear()
|
||||
self.other_cache.clear()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue