File: core_plugins_test.py

package info (click to toggle)
errbot 6.2.0%2Bds-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,848 kB
  • sloc: python: 11,573; makefile: 162; sh: 97
file content (30 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os

extra_plugin_dir = os.path.join(
    os.path.dirname(os.path.realpath(__file__)), "room_plugin"
)
extra_config = {
    "CORE_PLUGINS": ("Help", "Utils", "CommandNotFoundFilter"),
    "BOT_ALT_PREFIXES": ("!",),
    "BOT_PREFIX": "$",
}


def test_help_is_still_here(testbot):
    assert "All commands" in testbot.exec_command("!help")


def test_backup_help_not_here(testbot):
    assert "That command is not defined." in testbot.exec_command("!help backup")


def test_backup_should_not_be_there(testbot):
    assert 'Command "backup" not found.' in testbot.exec_command("!backup")


def test_echo_still_here(testbot):
    assert "toto" in testbot.exec_command("!echo toto")


def test_bot_prefix_replaced(testbot):
    assert "$help - Returns a help string" in testbot.exec_command("$help")