예제 #1
0
 def test_find_credentials_by_username(self):
     """
     test to check if we can find the credentials using just the username
     """
     self.new_account.save_credentials()
     test_credentials = Credentials("InstaJames", "test")  #new contact
     test_credentials.save_credentials()
     found_credentials = Credentials.find_by_username("InstaJames")
     self.assertEqual(found_credentials.password, test_credentials.password)
예제 #2
0
def find_credentials(username):
    """
    function that finds credentials by username and returns all credentias
    """
    return Credentials.find_by_username(username)