def test_hashtable_aio(): ht = Hashtable(1024) ht.add("spoons","dangerously low") assert ht.contains("spoons") == True assert ht.get("spoons") == "dangerously low"
def test_contains_returns_true_if_key_is_present(): hashtable = Hashtable() hashtable.add("xyz", 10) assert hashtable.contains("xyz")
def test_contains_returns_false_if_key_is_not_present(): hashtable = Hashtable() hashtable.add("xyz", 10) assert hashtable.contains("abc") == False