Пример #1
0
    def test_cache_should_be_clean_up_after_invalidate(self):
        cache = InMemoryCache()
        cache.update(flow=FLOW)

        cache.invalidate()

        self.assertEquals(cache.caching, {})
        self.assertEquals(cache.last_sync_time, None)
Пример #2
0
 def __init__(self):
     super(RapidProService, self).__init__()
     self.cache = InMemoryCache()
Пример #3
0
 def test_cache_should_be_expired_without_sync(self):
     self.assertTrue(InMemoryCache().expired)
Пример #4
0
    def test_should_be_able_to_update_cache(self):
        cache = InMemoryCache()
        cache.update(flow=FLOW)

        self.assertEqual(cache.flow, FLOW)