def testNoVary(self):
pass
# when there is no vary, a different Accept header (e.g.) should not
# impact if the cache is used
# test that the vary header is not sent
# uri = urllib.parse.urljoin(base, "vary/no-vary.asis")
# (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
# self.assertEqual(response.status, 200)
# self.assertFalse('vary' in response)
#
# (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
# self.assertEqual(response.status, 200)
# self.assertEqual(response.fromcache, True, msg="Should be from cache")
#
# (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/html'})
# self.assertEqual(response.status, 200)
# self.assertEqual(response.fromcache, True, msg="Should be from cache")
评论列表
文章目录