def test_retrive_collision(): hashtable = Hashtable() hashtable.add("fried", "chicken") hashtable.add("fired", "the employee") actual = [hashtable.get("fried"), hashtable.get("fired")] expect = ["chicken", "the employee"] assert actual == expect
def test_get_none_value(): hashtable = Hashtable() hashtable.add('length', 174) actual = hashtable.get('wight') expect = None assert actual == expect
def test_get_value(): hashtable = Hashtable() hashtable.add('length', 174) actual = hashtable.get('length') expect = 174 assert actual == expect