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