def test_two_cache_fors(self): m1 = cache_for(minutes=5) m2 = cache_for(minutes=3) r = Response() m1.modify_response(r) m2.modify_response(r) self.assertTrue(compare_datetimes(r.expires, datetime.utcnow() + timedelta(minutes=3)))
def test_two_cache_fors(self): m1 = cache_for(minutes=5) m2 = cache_for(minutes=3) r = Response() m1.modify_response(r) m2.modify_response(r) self.assertTrue( compare_datetimes(r.expires, datetime.utcnow() + timedelta(minutes=3)))
def test_cache_for(self): m = cache_for(minutes=5) r = Response() m.modify_response(r) self.assertTrue( compare_datetimes(r.expires, datetime.utcnow() + timedelta(minutes=5)))
def test_cache_for(self): m = cache_for(minutes=5) r = Response() m.modify_response(r) self.assertTrue(compare_datetimes(r.expires, datetime.utcnow() + timedelta(minutes=5)))