예제 #1
0
    def test_find_credential_by_account(self):
        '''
        test to check if we can find a credential by the account and display the information
        '''

        self.new_credential.save_credential()
        test_credential = Credentials("Twitter", "_ariso",
                                      "PyTh0n3!")  # new credential
        test_credential.save_credential()

        found_credential = Credentials.find_by_account("Twitter")

        self.assertEqual(found_credential.account, test_credential.account)
예제 #2
0
def find_credential(account):
    """
    Function that finds a Credential using the account name and displays the account Credentials
    """
    return Credentials.find_by_account(account)