From 9df93091287dc5e3cf8af3339c287432781c5114 Mon Sep 17 00:00:00 2001 From: Alistair Rogers Date: Wed, 3 Jan 2024 14:46:31 +0000 Subject: [PATCH] add test for init defaults, delete telemetry tests --- integrations/ollama/tests/test_generator.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/integrations/ollama/tests/test_generator.py b/integrations/ollama/tests/test_generator.py index ca25eccfc..fa15b8360 100644 --- a/integrations/ollama/tests/test_generator.py +++ b/integrations/ollama/tests/test_generator.py @@ -34,10 +34,15 @@ def test_run_model_unavailable(self): with pytest.raises(HTTPError): component.run(prompt="Why is Alistair so great?") - def test__get_telemetry_data(self): - component = OllamaGenerator(model_name="some_model") - observed = component._get_telemetry_data() - assert observed == {"model": "some_model"} + def test_init_default(self): + component = OllamaGenerator() + assert component.model_name == "orca-mini" + assert component.url == "http://localhost:11434/api/generate" + assert component.generation_kwargs == {} + assert component.system_prompt is None + assert component.template is None + assert component.raw is False + assert component.timeout == 30 @pytest.mark.parametrize( "configuration, prompt",