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', {})
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'])
def setUp(self): self.resolver = PluginResolver()