From ca798bc6ea7dbca00ad8a9a22360577f9174a2d3 Mon Sep 17 00:00:00 2001 From: ccurme Date: Wed, 19 Jun 2024 10:39:48 -0400 Subject: [PATCH] community: move test to integration tests (#23178) Tests failing on master with > FAILED tests/unit_tests/embeddings/test_ovhcloud.py::test_ovhcloud_embed_documents - ValueError: Request failed with status code: 401, {"message":"Bad token; invalid JSON"} --- libs/community/tests/integration_tests/test_ovhcloud.py | 8 ++++++++ .../tests/unit_tests/embeddings/test_ovhcloud.py | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 libs/community/tests/integration_tests/test_ovhcloud.py diff --git a/libs/community/tests/integration_tests/test_ovhcloud.py b/libs/community/tests/integration_tests/test_ovhcloud.py new file mode 100644 index 0000000000..bbbaa9d721 --- /dev/null +++ b/libs/community/tests/integration_tests/test_ovhcloud.py @@ -0,0 +1,8 @@ +from langchain_community.embeddings.ovhcloud import OVHCloudEmbeddings + + +def test_ovhcloud_embed_documents() -> None: + llm = OVHCloudEmbeddings(model_name="multilingual-e5-base") + docs = ["Hello", "World"] + output = llm.embed_documents(docs) + assert len(output) == len(docs) diff --git a/libs/community/tests/unit_tests/embeddings/test_ovhcloud.py b/libs/community/tests/unit_tests/embeddings/test_ovhcloud.py index c456238e69..caec981118 100644 --- a/libs/community/tests/unit_tests/embeddings/test_ovhcloud.py +++ b/libs/community/tests/unit_tests/embeddings/test_ovhcloud.py @@ -23,10 +23,3 @@ def test_ovhcloud_empty_access_token_should_not_raise_error() -> None: model_name="multilingual-e5-base", region="kepler", access_token="" ) assert isinstance(llm, OVHCloudEmbeddings) - - -def test_ovhcloud_embed_documents() -> None: - llm = OVHCloudEmbeddings(model_name="multilingual-e5-base") - docs = ["Hello", "World"] - output = llm.embed_documents(docs) - assert len(output) == len(docs)