def mock_client(self, mocker): client = Client(core_url=CORE_URL, serving_url=SERVING_URL) mocker.patch.object(client, "_connect_core") mocker.patch.object(client, "_connect_serving") client._core_url = CORE_URL client._serving_url = SERVING_URL return client
def secure_mock_client(self): client = Client( core_url=CORE_URL, serving_url=SERVING_URL, core_enable_ssl=True, serving_enable_ssl=True, ) client._core_url = CORE_URL client._serving_url = SERVING_URL return client
def mock_client_with_auth(self): client = Client( core_url=CORE_URL, serving_url=SERVING_URL, enable_auth=True, auth_token=_FAKE_JWT_TOKEN, ) client._core_url = CORE_URL client._serving_url = SERVING_URL return client
def mock_client(self): client = Client(core_url=CORE_URL, serving_url=SERVING_URL) client._core_url = CORE_URL client._serving_url = SERVING_URL return client