From 564b5a7841d3b36af86b366e77d5264cf8eb0338 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Fri, 8 Mar 2024 08:29:52 +0100 Subject: [PATCH] fix unit tests --- integrations/cohere/tests/test_cohere_generators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integrations/cohere/tests/test_cohere_generators.py b/integrations/cohere/tests/test_cohere_generators.py index c3dd59535..32fdfce50 100644 --- a/integrations/cohere/tests/test_cohere_generators.py +++ b/integrations/cohere/tests/test_cohere_generators.py @@ -13,7 +13,8 @@ class TestCohereGenerator: - def test_init_default(self): + def test_init_default(self, monkeypatch): + monkeypatch.setenv("COHERE_API_KEY", "foo") component = CohereGenerator() assert component.api_key == Secret.from_env_var(["COHERE_API_KEY", "CO_API_KEY"]) assert component.model == "command"