Ejemplo n.º 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"))
Ejemplo n.º 2
0
 def test_query_doesnt_exist_in_hash_entry(self):
     hash_entry = HashEntry(4, "roberto")
     self.assertFalse(hash_entry.query("onofre"))
Ejemplo n.º 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"])
Ejemplo n.º 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"])
Ejemplo n.º 5
0
 def test_query_doesnt_exist_in_hash_entry(self):
     hash_entry = HashEntry(4, "roberto")
     self.assertFalse(hash_entry.query("onofre"))
Ejemplo n.º 6
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"))
Ejemplo n.º 7
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"])