def test_find_password_by_number(self): self.new_account.save_password() test_password = Password("Test", "user", "0711223344", "*****@*****.**") # new password test_password.save_password() found_password = Password.find_by_number("0711223344") self.assertEqual(found_password.email, test_password.email)
def test_find_password_by_number(self): ''' test to check if we can find a password by phone number and display information ''' self.new_password.save_password() test_password = Password("Micah", "Mutugi", "python") # new password test_password.save_password() found_password = Password.find_by_number("python")
def test_find_password_by_number(self): ''' test to check if we can find a contact by phone number and display information ''' self.new_password.save_password() test_password = Password("Test", "user", "0740772578", "*****@*****.**", "evracheche1999") # new contact test_password.save_password() found_password = Password.find_by_number("0740772578") self.assertEqual(found_password.email, test_password.email)
def test_find_password_by_number(self): ''' test to check if we can find a password by phone number and display information ''' self.new_contact.save_contact() test_password = Password("Test","user","0746432419","*****@*****.**") # new password test_password.save_password() found_password = Password.find_by_number("0746432419") self.assertEqual(found_password.email,test_password.email) if __name__ == '__main__': unittest.main()
def find_password(number): ''' Function that finds a contact by number and returns the contact ''' return Password.find_by_number(number)
def find_password(number): return Password.find_by_number(number)
def find_password(number): ''' Function that finds a password by number and returns the password ''' return Password.find_by_number(number)