- Add missing actions and make a clear boundary between actions, services and nfra (i.e: actions shouldn't use stuff from infra/) - Delete stuff not in use: tts, gtts, etc - Add a ton of tests
21 lines
790 B
Python
21 lines
790 B
Python
from tests.conftest import ChatbotFactory, QuoteFactory
|
|
|
|
|
|
def test_chatbot_format_mods_from_string_validator(chatbot_factory: ChatbotFactory):
|
|
chatbot = chatbot_factory.build(mods="foo,bar")
|
|
assert chatbot.mods == ["foo", "bar"]
|
|
|
|
|
|
def test_chatbot_mods_as_string_returns_empty_string(chatbot_factory: ChatbotFactory):
|
|
modsless_chatbot = chatbot_factory.build(mods=[])
|
|
assert modsless_chatbot.mods_as_string == ""
|
|
|
|
|
|
def test_quote_as_pretty(quote_factory: QuoteFactory):
|
|
quote = quote_factory.build(quote="Foo", author="Bar")
|
|
assert quote.as_pretty() == "«Foo» - Bar"
|
|
|
|
|
|
def test_quote_as_pretty_saved(quote_factory: QuoteFactory):
|
|
quote = quote_factory.build(quote="Foo", author="Bar")
|
|
assert quote.as_pretty_saved() == "He añadido la cita «Foo» de Bar"
|