MCPcopy Index your code
hub / github.com/encode/django-rest-framework / test_head_caching

Method test_head_caching

tests/test_renderers.py:433–442  ·  view source on GitHub ↗

Test caching of HEAD requests

(self)

Source from the content-addressed store, hash-verified

431 Tests specific to caching responses
432 """
433 def test_head_caching(self):
434 """
435 Test caching of HEAD requests
436 """
437 response = self.client.head('/cache')
438 cache.set('key', response)
439 cached_response = cache.get('key')
440 assert isinstance(cached_response, Response)
441 assert cached_response.content == response.content
442 assert cached_response.status_code == response.status_code
443
444 def test_get_caching(self):
445 """

Callers

nothing calls this directly

Calls 3

headMethod · 0.80
setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected