Ejemplo n.º 1
0
def test_get_version():
    bot = example_bot.ExampleBot()

    output = bot.process('/version')

    assert example_bot.__version__ in output
    assert eddie.__version__ in output
Ejemplo n.º 2
0
def main_file():
    example_bot_v = example_bot.ExampleBot(accounts=config.Bot.accounts,
                                           pm=config.Bot.pm_connect)
    try:
        text_i = config.Database.take_lang_bot(config.Bot.bot_lang, "start")
        text_f = text_i.format(config.Files.delete_pycache())
        print(text_f)

        # Load database.
        config.Database.load_all()

        # Start rooms.
        config.Tools.start_connections(example_bot_v,
                                       ignore_room=["for_pm"],
                                       anon_room=[])

        # Start bot.
        example_bot_v.main()
    except (Exception, BaseException):
        print("Error: {}".format(str(config.Tools.error_def())))
Ejemplo n.º 3
0
def test_default_echoes():
    bot = example_bot.ExampleBot()

    assert example_bot.MSG_HELP in bot.process('hello!')
Ejemplo n.º 4
0
def test_welcome():
    bot = example_bot.ExampleBot()

    output = bot.process('/start')

    assert example_bot.MSG_WELCOME == output