| 1 |
import os |
| 2 |
|
| 3 |
extra_plugin_dir = os.path.join( |
| 4 |
os.path.dirname(os.path.realpath(__file__)), "room_plugin" |
| 5 |
) |
| 6 |
extra_config = { |
| 7 |
"CORE_PLUGINS": ("Help", "Utils", "CommandNotFoundFilter"), |
| 8 |
"BOT_ALT_PREFIXES": ("!",), |
| 9 |
"BOT_PREFIX": "$", |
| 10 |
} |
| 11 |
|
| 12 |
|
| 13 |
def test_help_is_still_here(testbot): |
| 14 |
assert "All commands" in testbot.exec_command("!help") |
| 15 |
|
| 16 |
|
| 17 |
def test_backup_help_not_here(testbot): |
| 18 |
assert "That command is not defined." in testbot.exec_command("!help backup") |
| 19 |
|
| 20 |
|
| 21 |
def test_backup_should_not_be_there(testbot): |
| 22 |
assert 'Command "backup" not found.' in testbot.exec_command("!backup") |
| 23 |
|
| 24 |
|
| 25 |
def test_echo_still_here(testbot): |
| 26 |
assert "toto" in testbot.exec_command("!echo toto") |
| 27 |
|
| 28 |
|
| 29 |
def test_bot_prefix_replaced(testbot): |
| 30 |
assert "$help - Returns a help string" in testbot.exec_command("$help") |