Ejemplo n.º 1
0
    def test_find_contact_by_number(self):
        '''
    test to check if we can find a contact by phone number and display information
    '''

        self.new_contact.save_contact()
        test_contact = Contact("Test", "user", "0712345678", "*****@*****.**")
        test_contact.save_contact()

        found_contact = Contact.find_contact_by_number("0712345678")
        self.assertEqual(found_contact.email, test_contact.email)
Ejemplo n.º 2
0
def find_contact(number):
    '''
  function that finds a contact by phone number and returns the contact
  '''

    return Contact.find_contact_by_number(number)