Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 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
Esempio n. 4
0
 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