def test_no_useful_headers(self): resp = DummyResponse(headers=idict({})) self.assertEqual(cache.get_last_modified(resp),None)
def test_bad_date(self): resp = DummyResponse(headers=idict({'last-modified':'phil'})) self.assertEqual(cache.get_last_modified(resp),None)
def test_date(self): resp = DummyResponse(headers=idict({'last-modified':formatdate(200.0)})) self.assertEqual(cache.get_last_modified(resp),200.0)
def test_no_useful_headers(self): resp = DummyResponse(headers=idict({})) self.assertEqual(cache.get_last_modified(resp), None)
def test_bad_date(self): resp = DummyResponse(headers=idict({'last-modified': 'phil'})) self.assertEqual(cache.get_last_modified(resp), None)
def test_date(self): resp = DummyResponse( headers=idict({'last-modified': formatdate(200.0)})) self.assertEqual(cache.get_last_modified(resp), 200.0)