예제 #1
0
    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))
예제 #2
0
    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))
예제 #3
0
 def test_botutils_cpuinfo(self):
     msg = message.Message(body="")
     msg.command = "cpuinfo"
     result = yield from botutils.onCommand(msg)
     self.assertEqual(type(result), type(msg))
예제 #4
0
 def test_botutils_plugintree(self):
     msg = message.Message(body="")
     msg.command = "plugintree"
     result = yield from botutils.onCommand(msg)
     self.assertEqual(type(result), type(msg))