def test_friend_to_remove(self): """ tests that the friend_to_remove() functions returns the friend with the given name and age that the user wants to remove returns true if the friend_to_remove function works as it should """ friendToRemove = Network.friend_to_remove(self, "Vanessa", 18) #checks that the Person returned by the friend_to_remove() function contains that name and age self.assertEqual(friendToRemove.get_name(), "Vanessa")
def test_remove_friend(self): """ Tests that the remove_friend() function removes the specified person to the set Takes a Person, friendToRemove and returns True if the specified friend was removed from the set or False if it wasn't """ friendToRemove = Network.friend_to_remove(self, "Vanessa", 18) Network.remove_friend(self, friendToRemove) #check that the friend was removed from the set self.assertTrue(friendToRemove is not Network.setOfFriends)
def test_friend_to_remove(self): """ tests that the friend_to_remove() functions returns the friend with the given name and age that the user wants to remove returns true if the friend_to_remove function works as it should """ friendToRemove = Network.friend_to_remove(self, "Vanessa", 18) #checks that the Person returned by the friend_to_remove() function contains that name and age if(friendToRemove.get_name() == "Vanessa" and friendToRemove.get_age() == 18 ): return True else: return False
def test_friend_to_remove(self): """ tests that the friend_to_remove() functions returns the friend with the given name and age that the user wants to remove returns true if the friend_to_remove function works as it should """ friendToRemove = Network.friend_to_remove(self, "Vanessa", 18) #checks that the Person returned by the friend_to_remove() function contains that name and age if (friendToRemove.get_name() == "Vanessa" and friendToRemove.get_age() == 18): return True else: return False