def test_exist_credential(self): self.new_credentials.save_credential() self.test_credentials = Credentials("osmanhared", "instagram", "osman", "osmanhared") self.test_credentials.save_credential() credential_exists = Credentials.find_by_account("instagram") self.assertTrue(credential_exists)
def test_find_credentials_by_account(self): ''' Test to check if we can find a credential by the account name and display more information about it ''' self.new_credentials.save_credentials() test_credentials = Credentials("Instagram", "Gloria Givondo", "thegram") test_credentials.save_credentials() found_credentials = Credentials.find_by_account("Instagram") self.assertEqual(found_credentials.password, test_credentials.password)
def find_credentials(account): ''' finds a credential by account and returns the credentials ''' return Credentials.find_by_account(account)
def find_credential(account): return Credentials.find_by_account(account)
def find_credentials(account): ''' Function that finds Credential by account name and return the credential details that matches the account name ''' return Credentials.find_by_account(account)