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)
Exemple #2
0
 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)
Exemple #3
0
 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)
Exemple #4
0
 def test_bad_cache_control(self):
     with self.assertRaises(TypeError):
         cache_control(foo=True)
Exemple #5
0
 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)
 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)