예제 #1
0
	def test_change_name(self):
		print "test_change_name called"
		phonebook.change_name(phonebook.read_pb(filename), 'Alan' '555')
		result = phonebook.lookup_name(phonebook.read_pb(filename), 'Alan')
		self.assertEqual(result, 'Alan 555')
예제 #2
0
	def test_lookup(self):
		print "test_lookup called"		
		result = phonebook.lookup_name(phonebook.read_pb(filename), 'Alan')
		self.assertEqual(result, 'Alan 555')
예제 #3
0
	def test_add_phonebook(self):
	 	print "test_add_phonebook called"	 		
		phonebook.add_phonebook(phonebook.read_pb(filename),'Alan', '444')
		result = phonebook.lookup_name(phonebook.read_pb(filename),'Alan')
		self.assertEqual(result, 'Alan 444')