Example #1
0
	def test_reverse_lookup(self):
		print "test_reverse-lookup called"
		result = phonebook.reverse_lookup(phonebook.read_pb(filename), '555')
		self.assertEqual(result, 'Alan 555')
Example #2
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')
Example #3
0
	def test_lookup(self):
		print "test_lookup called"		
		result = phonebook.lookup_name(phonebook.read_pb(filename), 'Alan')
		self.assertEqual(result, 'Alan 555')
Example #4
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')