

def test_never_cache_decorator(self):

    @never_cache
    def a_view(request):
        return HttpResponse()
    r = a_view(HttpRequest())
    self.assertEqual(set(r['Cache-Control'].split(', ')), {'max-age=0', 'no-cache', 'no-store', 'must-revalidate'})

dataset/ETHPy150Open django/django/tests/decorators/tests.py NeverCacheDecoratorTest.test_never_cache_decorator/original