def test_meta_v_date_expired(self): dt = datetime.now() - timedelta(weeks=54) obj = {'_meta': {'v_date': dt}} self.assertTrue(expired(obj))
def test_v_date_expired_backward_compatibility(self): dt = datetime.now() - timedelta(weeks=54) obj = {'v_date': dt} self.assertTrue(expired(obj))
def test_empty(self): self.assertTrue(expired({}))
def test_notfound_expired_early(self): dt = datetime.now() - timedelta(weeks=5) obj = {'_meta': {'v_date': dt, CepTracker._notfound_key: True}} self.assertTrue(expired(obj))