Esempio n. 1
0
 def test_no_useful_headers(self):    
     resp = DummyResponse(headers=idict({}))
     self.assertEqual(cache.get_last_modified(resp),None)
Esempio n. 2
0
 def test_bad_date(self):
     resp = DummyResponse(headers=idict({'last-modified':'phil'}))
     self.assertEqual(cache.get_last_modified(resp),None)
Esempio n. 3
0
 def test_date(self):
     resp = DummyResponse(headers=idict({'last-modified':formatdate(200.0)}))
     self.assertEqual(cache.get_last_modified(resp),200.0)
Esempio n. 4
0
 def test_no_useful_headers(self):
     resp = DummyResponse(headers=idict({}))
     self.assertEqual(cache.get_last_modified(resp), None)
Esempio n. 5
0
 def test_bad_date(self):
     resp = DummyResponse(headers=idict({'last-modified': 'phil'}))
     self.assertEqual(cache.get_last_modified(resp), None)
Esempio n. 6
0
 def test_date(self):
     resp = DummyResponse(
         headers=idict({'last-modified': formatdate(200.0)}))
     self.assertEqual(cache.get_last_modified(resp), 200.0)