def test_additive_cache_control(self): m = cache_control(public=True) r = Response() r.cache_control.no_transform=True m.modify_response(r) self.assertTrue(r.cache_control.public) self.assertIn('no-transform', r.cache_control)
def test_additive_cache_control(self): m = cache_control(public=True) r = Response() r.cache_control.no_transform = True m.modify_response(r) self.assertTrue(r.cache_control.public) self.assertIn('no-transform', r.cache_control)
def test_overriding_cache_control(self): m = cache_control(public=True) r = Response() r.cache_control.public = False m.modify_response(r) self.assertTrue(r.cache_control.public)
def test_bad_cache_control(self): with self.assertRaises(TypeError): cache_control(foo=True)
def test_cache_control(self): m = cache_control(public=True) r = Response() m.modify_response(r) self.assertTrue(r.cache_control.public)
def test_overriding_cache_control(self): m = cache_control(public=True) r = Response() r.cache_control.public=False m.modify_response(r) self.assertTrue(r.cache_control.public)