コード例 #1
0
def test_ccbot_parse_command_parses_command_and_action_and_args():
    cc_bot = CCBot()
    command, action, args = cc_bot.parse_command("ccbot foobar 1 2 3")
    assert command == "ccbot"
    assert action == "foobar"
    assert len(args) == 3
    assert args == ['1', '2', '3']
コード例 #2
0
def test_ccbot_parse_command_parses_command_and_action():
    cc_bot = CCBot()
    command, action, args = cc_bot.parse_command("ccbot foobar")
    assert command == "ccbot"
    assert action == "foobar"
    assert len(args) == 0
コード例 #3
0
def test_ccbot_parse_command_parses_command_only():
    cc_bot = CCBot()
    command, action, args = cc_bot.parse_command("ccbot")
    assert command == "ccbot"
    assert action is None
    assert len(args) == 0