0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00

Isolated some cache tests; refs #23947.

This reverts a change made in 40c60efecc
which was incorrect and caused CacheKeyWarnings.
This commit is contained in:
Tim Graham 2015-01-08 12:47:45 -05:00
parent 543df07720
commit 5c43fd4825

View File

@ -1350,6 +1350,9 @@ class CacheUtils(TestCase):
self.path = '/cache/test/'
self.factory = RequestFactory(HTTP_HOST=self.host)
def tearDown(self):
cache.clear()
def _get_request_cache(self, method='GET', query_string=None, update_cache=None):
request = self._get_request(self.host, self.path,
method, query_string=query_string)
@ -1385,7 +1388,7 @@ class CacheUtils(TestCase):
request = self.factory.get(self.path)
response = HttpResponse()
# Expect None if no headers have been set yet.
self.assertIsNone(get_cache_key(request, response))
self.assertIsNone(get_cache_key(request))
# Set headers to an empty list.
learn_cache_key(request, response)