示例#1
0
class HelpRegexTest(unittest.TestCase):

    def setUp(self):
        self.resolver = PluginResolver()
    
    def test_help_no_arguments(self):
        assert self.resolver.resolve('help', {})
    
    def test_help_with_argument(self):
        assert self.resolver.resolve('help plugin_name', {})
示例#2
0
 def answer(self, message):
     resolver = PluginResolver()
     conn_data = {
         'message': message,
     }
     try:
         defer = resolver.resolve(unicode(message.body), conn_data)
         defer.addCallback(self.send_response, to=message['from'])
     except LookupError:
         self.send_response(self.CANT_UNDERSTANT, to=message['from'])
示例#3
0
 def setUp(self):
     self.resolver = PluginResolver()