def test_contact_exists(self): """ Tests if the contact_exists will return a boolean depending on whether or not a contact is found when a number is passed. """ self.new_contact.save_contact() self.added_contact = Contact("Ethan", "Hunt", "0786474", "*****@*****.**") self.added_contact.save_contact() existing_contact = Contact.contact_exists("007007007") """ Here we use the assertTrue method for a change. that should return a boolean """ self.assertTrue(existing_contact)
def exists(number): """ Returns a boolean depending on if number has matching contact. """ return Contact.contact_exists(number)