Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszOssGit committed Dec 2, 2024
1 parent 4d783b4 commit 94a96d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libs/ibm/tests/unit_tests/test_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def test_initialize_watsonx_embeddings_cloud_bad_path() -> None:
try:
WatsonxEmbeddings(model_id=MODEL_ID, url="https://us-south.ml.cloud.ibm.com") # type: ignore[arg-type]
except ValueError as e:
assert "apikey" in e.__str__()
assert "WATSONX_APIKEY" in e.__str__()
assert "apikey" in e.__str__() and "token" in e.__str__()
assert "WATSONX_APIKEY" in e.__str__() and "WATSONX_TOKEN" in e.__str__()


def test_initialize_watsonx_embeddings_cpd_bad_path_without_all() -> None:
Expand Down
4 changes: 2 additions & 2 deletions libs/ibm/tests/unit_tests/test_llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def test_initialize_watsonxllm_cloud_bad_path() -> None:
try:
WatsonxLLM(model_id="google/flan-ul2", url="https://us-south.ml.cloud.ibm.com") # type: ignore[arg-type]
except ValueError as e:
assert "apikey" in e.__str__()
assert "WATSONX_APIKEY" in e.__str__()
assert "apikey" in e.__str__() and "token" in e.__str__()
assert "WATSONX_APIKEY" in e.__str__() and "WATSONX_TOKEN" in e.__str__()


def test_initialize_watsonxllm_cpd_bad_path_without_all() -> None:
Expand Down
4 changes: 2 additions & 2 deletions libs/ibm/tests/unit_tests/test_rerank.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def test_initialize_watsonxllm_cloud_bad_path() -> None:
try:
WatsonxRerank(model_id=MODEL_ID, url="https://us-south.ml.cloud.ibm.com") # type: ignore[arg-type]
except ValueError as e:
assert "apikey" in e.__str__()
assert "WATSONX_APIKEY" in e.__str__()
assert "apikey" in e.__str__() and "token" in e.__str__()
assert "WATSONX_APIKEY" in e.__str__() and "WATSONX_TOKEN" in e.__str__()


def test_initialize_watsonxllm_cpd_bad_path_without_all() -> None:
Expand Down

0 comments on commit 94a96d4

Please sign in to comment.