示例#1
0
    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)    
示例#2
0
def find_credentials(account):
    '''
        Function that finds a credential by number and returns the credential
        '''
    return Credentials.find_by_account(account)