def test_key_should_check_for_exists_with_ttl(keys: Tuple[Hashable], ttl: int, exists: bool, ttl_dict: TTLDict) -> None: for key in keys: ttl_dict.set(key, key, ttl=ttl) assert ttl_dict.exists(*keys) is exists
def test_should_return_false_if_keys_not_exist(keys: Tuple[Hashable], ttl_dict: TTLDict) -> None: assert ttl_dict.exists(*keys) is False
def test_key_should_check_for_exists(keys: Tuple[Hashable], ttl_dict: TTLDict) -> None: for key in keys: ttl_dict.set(key, key) assert ttl_dict.exists(*keys) is True