From 94a96d4390e4bd9d2e1cd2950b2e505d682f7939 Mon Sep 17 00:00:00 2001 From: Mateusz Szewczyk Date: Mon, 2 Dec 2024 11:09:20 +0100 Subject: [PATCH] update tests --- libs/ibm/tests/unit_tests/test_embeddings.py | 4 ++-- libs/ibm/tests/unit_tests/test_llms.py | 4 ++-- libs/ibm/tests/unit_tests/test_rerank.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/ibm/tests/unit_tests/test_embeddings.py b/libs/ibm/tests/unit_tests/test_embeddings.py index 8055259..3f13c79 100644 --- a/libs/ibm/tests/unit_tests/test_embeddings.py +++ b/libs/ibm/tests/unit_tests/test_embeddings.py @@ -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: diff --git a/libs/ibm/tests/unit_tests/test_llms.py b/libs/ibm/tests/unit_tests/test_llms.py index 6343181..f0cc128 100644 --- a/libs/ibm/tests/unit_tests/test_llms.py +++ b/libs/ibm/tests/unit_tests/test_llms.py @@ -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: diff --git a/libs/ibm/tests/unit_tests/test_rerank.py b/libs/ibm/tests/unit_tests/test_rerank.py index 38b58ca..56fe10e 100644 --- a/libs/ibm/tests/unit_tests/test_rerank.py +++ b/libs/ibm/tests/unit_tests/test_rerank.py @@ -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: