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']
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
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