Skip to content

Commit

Permalink
update test case due to latest client changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hsm207 committed Mar 5, 2024
1 parent 9a30bdd commit f620aaf
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions integrations/weaviate/tests/test_document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,32 +155,24 @@ def test_init(self, mock_weaviate_client_class, monkeypatch):
monkeypatch.setenv("WEAVIATE_API_KEY", "my_api_key")
WeaviateDocumentStore(
collection_settings={"class": "My_collection"},
# auth_client_secret=AuthApiKey(),
# proxies={"http": "http://proxy:1234"},
auth_client_secret=AuthApiKey(),
additional_headers={"X-HuggingFace-Api-Key": "MY_HUGGINGFACE_KEY"},
embedded_options=EmbeddedOptions(
persistence_data_path=DEFAULT_PERSISTENCE_DATA_PATH,
binary_path=DEFAULT_BINARY_PATH,
version="1.23.7",
hostname="127.0.0.1",
),
# additional_config=AdditionalConfig(
# proxies={"http": "http://proxy:1234"},
# ),
additional_config=AdditionalConfig(
proxies={"http": "http://proxy:1234"}, trust_env=False, timeout=(10, 60)
),
)

# Verify client is created with correct parameters

mock_weaviate_client_class.assert_called_once_with(
# connection_params = connection_params,
# collection_settings={"class": "My_collection"},
# auth_client_secret=WeaviateAuthApiKey("my_api_key"),
# timeout_config=(10, 60),
# proxies={"http": "http://proxy:1234"},
# trust_env=False,
auth_client_secret=AuthApiKey().resolve_value(),
connection_params=None,
auth_client_secret=None,
additional_config=None,
additional_headers={"X-HuggingFace-Api-Key": "MY_HUGGINGFACE_KEY"},
embedded_options=EmbeddedOptions(
persistence_data_path=DEFAULT_PERSISTENCE_DATA_PATH,
Expand All @@ -189,6 +181,9 @@ def test_init(self, mock_weaviate_client_class, monkeypatch):
hostname="127.0.0.1",
),
skip_init_checks=False,
additional_config=AdditionalConfig(
proxies={"http": "http://proxy:1234"}, trust_env=False, timeout=(10, 60)
),
)

# Verify collection is created
Expand Down

0 comments on commit f620aaf

Please sign in to comment.