def test_botutils_hostinfo(self): server = Server server.me = 'StarBot' msg = message.Message(body="") msg.command = "hostinfo" msg.server = server result = yield from botutils.onCommand(msg) self.assertEqual(type(result), type(msg))
def test_botutils_help(self): result = botutils.onInit(__import__('api.plugin')) bot.Bot.plugins.append(result) for command in result.commands: bot.Bot.commands.append(command) msg = message.Message(body="") msg.command = "help" result = yield from botutils.onCommand(msg) self.assertEqual(type(result), type(msg))
def test_botutils_cpuinfo(self): msg = message.Message(body="") msg.command = "cpuinfo" result = yield from botutils.onCommand(msg) self.assertEqual(type(result), type(msg))
def test_botutils_plugintree(self): msg = message.Message(body="") msg.command = "plugintree" result = yield from botutils.onCommand(msg) self.assertEqual(type(result), type(msg))