コード例 #1
0
ファイル: tests.py プロジェクト: boreq/archive_chan_flask
 def test_wrapper(self):
     now = cache.cached(timeout=2)(utc_now)
     value = now()
     time.sleep(1)
     self.assertEqual(now(), value, self.fail_message)
コード例 #2
0
ファイル: tests.py プロジェクト: boreq/archive_chan_flask
 def test_wrapper_expire(self):
     now = cache.cached(timeout=1)(utc_now)
     value = now()
     time.sleep(2)
     self.assertNotEqual(now(), value)