def setup_function(): Account.clear_cache() Comment.clear_cache() Location.clear_cache() Media.clear_cache() Story.clear_cache() Tag.clear_cache()
def setup_function(): Account.clear_cache() Media.clear_cache() Location.clear_cache() Tag.clear_cache() if not anon["global_delay"] is None: min_delay = anon["global_delay"].get("min", 0) max_delay = anon["global_delay"].get("max", 120) sleep(random() * (max_delay - min_delay) + min_delay)
def test_clear_cache_account(id): account = Account(id) assert Account.cache == {id: account} Account.clear_cache() assert Account.cache == dict()