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 = Credentials("Test", "anum", "password") # new account test_account.save_account() found_account = Credentials.find_by_number("anum") self.assertEqual(found_account, Credentials.find_by_number("anum"))
def test_find_user_by_number(self): """ test to check if we can find a credential by their accountusername and display the credential """ self.newaccount.save_account() testaccount=Credentials("TestUsername","TestAccount","Password") testaccount.save_account() found_account = Credentials.find_by_number("TestUsername") self.assertEqual(found_account.accountusername,testaccount.accountusername)
def test_find_creditial(self): """ test to check if we can find a credential entry by account name and display the details of the credential """ self.new_credentials.save_user_credentials() test_creditial = Credentials('gideon','gideon11','34281475Gk') test_creditial.save_user_credentials() the_creditial = Credentials.find_by_number("gideon") self.assertEqual(the_creditial.account,test_creditial.account)
def find_account(number): return Credentials.find_by_number(number)
def find_account(name): ''' Function that finds a user by name and returns the account ''' return Credentials.find_by_number(name)
def find_credential(account): """ Function that finds a Credentials by an account name and returns the Credentials that belong to that account """ return Credentials.find_by_number(account)