def test_find_credential_by_account(self): ''' test to check if we can find a credential by account number and display information ''' self.new_credentials.save_credentials() test_credentials = Credentials("twitter","kwengu","0000") # new credentials test_credentials.save_credentials() found_credentials = Credentials.find_by_account("twitter") self.assertEqual(found_credentials.account,test_credentials.account)
def find_credentials(account): ''' Function that finds a credential by number and returns the credential ''' return Credentials.find_by_account(account)