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