Exemplo n.º 1
0
 def test_get_cache_policy_config_file(self):
   expected = None
   actual = _get_cache_policy('contenu%2Fmedias%2Fvideo.php%3Fq%3Dconfig%26id%3D2151308%26autostart%3Dtrue')
   self.assertEqual(actual, expected)
Exemplo n.º 2
0
 def test_get_cache_policy_video_list(self):
   expected = SHORT_EXPIRY
   actual = _get_cache_policy('toutes-les-videos%2Ftype-7340%2Fmachine-110%2F%3Fp%3D2')
   self.assertEqual(actual, expected)
Exemplo n.º 3
0
 def test_get_cache_policy_homepage(self):
   expected = SHORT_EXPIRY
   actual = _get_cache_policy('http%3A%2F%2Fwww.jeuxvideo.com%2F')
   self.assertEqual(actual, expected)
Exemplo n.º 4
0
 def test_get_cache_policy_video_page(self):
   expected = DEFAULT_EXPIRY
   actual = _get_cache_policy('videos%2Fchroniques%2F427331%2Fspeed-game-une-cyber-run-sur-deus-ex-human-revolution.htm')
   self.assertEqual(actual, expected)