示例#1
0
 def test_query_exists_in_hash_entry(self):
     hash_entry = HashEntry(3, "lilian")
     hash_entry.append("nina")
     self.assertTrue(hash_entry.query("lilian"))
     self.assertTrue(hash_entry.query("nina"))
示例#2
0
 def test_query_doesnt_exist_in_hash_entry(self):
     hash_entry = HashEntry(4, "roberto")
     self.assertFalse(hash_entry.query("onofre"))
示例#3
0
 def test_append_jan_to_hash_entry(self):
     hash_entry = HashEntry(2, "tati")
     hash_entry.append("jan")
     self.assertEquals(hash_entry.key, 2)
     self.assertEquals(hash_entry.value_list, ["tati", "jan"])
示例#4
0
 def test_hash_entry_constructor(self):
     hash_entry = HashEntry(1, "tati")
     self.assertEquals(hash_entry.key, 1)
     self.assertEquals(hash_entry.value_list, ["tati"])
 def test_query_doesnt_exist_in_hash_entry(self):
     hash_entry = HashEntry(4, "roberto")
     self.assertFalse(hash_entry.query("onofre"))
 def test_query_exists_in_hash_entry(self):
     hash_entry = HashEntry(3, "lilian")
     hash_entry.append("nina")
     self.assertTrue(hash_entry.query("lilian"))
     self.assertTrue(hash_entry.query("nina"))
 def test_append_jan_to_hash_entry(self):
     hash_entry = HashEntry(2, "tati")
     hash_entry.append("jan")
     self.assertEquals(hash_entry.key, 2)
     self.assertEquals(hash_entry.value_list, ["tati", "jan"])