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)
Esempio n. 2
0
    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)
Esempio n. 3
0
def find_credentials(account):
    '''
    finds a credential by account and returns the credentials
    '''
    return Credentials.find_by_account(account)
Esempio n. 4
0
def find_credential(account):
    return Credentials.find_by_account(account)
Esempio n. 5
0
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)