def test_find_account_by_number(self): ''' test to check if we can find a account by phone number and display information ''' self.new_account.save_account() test_account = Account("Richie", "spice", "0712345678", "*****@*****.**") test_account.save_account() found_account = Account.find_by_number("0712345678") self.assertEqual(found_account.email, test_account.email)
def find_account(number): ''' Function that finds an account by number and returns the account ''' return Account.find_by_number(number)