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)
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)
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)