From eaa7597853c076788b2d634aef9bb06c8840b9f8 Mon Sep 17 00:00:00 2001 From: Sverre Nystad Date: Tue, 19 Sep 2023 02:16:27 +0200 Subject: [PATCH] Fix: Make api test marked, and give keys to generators --- tests/text_generation/test_text_generator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/text_generation/test_text_generator.py b/tests/text_generation/test_text_generator.py index d9d2fc6..dfcb141 100644 --- a/tests/text_generation/test_text_generator.py +++ b/tests/text_generation/test_text_generator.py @@ -1,17 +1,18 @@ import pytest from src.text_generation.text_generator import get_default_text_generator, TextGenerator, LLM, Chatbot +@pytest.mark.apitest def test_get_default_text_generator(): generator: TextGenerator = get_default_text_generator() assert generator is not None, "The generator was None" assert isinstance(generator, TextGenerator), "The generator was not an TextGenerator" def test_LLM(): - generator: TextGenerator = LLM() + generator: TextGenerator = LLM("DUMMY_KEY") assert isinstance(generator, TextGenerator), "The generator was not an TextGenerator" def test_Chatbot(): - generator: TextGenerator = Chatbot() + generator: TextGenerator = Chatbot("DUMMY_KEY") assert isinstance(generator, TextGenerator), "The generator was not an TextGenerator"