Пример #1
0
 def test_noreplace(self):
     CACHE_PATH.append("test")
     ctf = CachebusterTween(handler, None)
     request = MyRequest("/test2/123456/build.css")
     response = ctf(request)
     self.assertEqual(request.path_info, "/test2/123456/build.css")
     self.assertEqual(response.headers["Access-Control-Allow-Origin"], "*")
     self.assertEqual(response.headers["Access-Control-Allow-Headers"], "X-Requested-With, Content-Type")
Пример #2
0
 def test_noreplace(self):
     CACHE_PATH.append("test")
     ctf = CachebusterTween(handler, None)
     request = MyRequest("/test2/123456/build.css")
     response = ctf(request)
     self.assertEqual(request.path_info, "/test2/123456/build.css")
     # test no CORS
     self.assertNotIn("Access-Control-Allow-Origin", response.headers.keys())
     self.assertNotIn("Access-Control-Allow-Headers", response.headers.keys())
Пример #3
0
 def test_noreplace(self):
     CACHE_PATH.append("test")
     ctf = CachebusterTween(handler, None)
     request = MyRequest("/test2/123456/build.css")
     ctf(request)
     self.assertEqual(request.path_info, "/test2/123456/build.css")