'Helper method for getting the client and user and logging in. Returns client.'

def login_client(self, api_client, user):

    client = getattr(self, api_client)
    user = getattr(self, user)
    client.login(username=user.username, password=TEST_PASSWORD)
    return client
