def test_cache_set_error(): store = RedisStore(port=9999, max_retry_count=2, retry_delay=2) start_time = time.time() with pytest.raises(redis.ConnectionError): store.cache_set('key', 'value', 60) excec_time = time.time() - start_time assert excec_time >= 4
def store(): store = RedisStore() store.cache_set('key', 'value', 60 * 60) return store