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"
