Skip to content

Commit

Permalink
Fix: Make api test marked, and give keys to generators
Browse files Browse the repository at this point in the history
  • Loading branch information
SverreNystad committed Sep 19, 2023
1 parent 6b1c8d3 commit eaa7597
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/text_generation/test_text_generator.py
Original file line number Diff line number Diff line change
@@ -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"


Expand Down

0 comments on commit eaa7597

Please sign in to comment.