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

        self.new_credential.save_credential()
        test_credential = Credential ("Gmail","koyoo maxwel","maxwell0101") # new credential
        test_credential.save_credential()

        found_credential = Credential.find_by_acc_name("Gmail")

        self.assertEqual(found_credential.password,test_credential.password)
예제 #2
0
    def test_find_credential_by_acc_name(self):
        '''
        test to check if we can find a credential by account name and display information
        '''

        self.new_credential.save_credential()
        test_credential = Credential ("Twitter","khaleesifan","24hugugugu") # new credential
        test_credential.save_credential()

        found_credential = Credential.find_by_acc_name("Twitter")

        self.assertEqual(found_credential.pword,test_credential.pword)
예제 #3
0
def find_credential(acc_name):
    '''
    Function that finds a credential by acc_name and returns the credential
    '''
    return Credential.find_by_acc_name(acc_name)