From 6b0f80e8f03b888769b70c16da50949bedd9d910 Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Sun, 20 Dec 2015 21:30:13 +0100 Subject: [PATCH] fix test --- test_urlbot.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test_urlbot.py b/test_urlbot.py index 28b1423..ecb3428 100644 --- a/test_urlbot.py +++ b/test_urlbot.py @@ -173,17 +173,20 @@ class TestPlugins(unittest.TestCase): they don't return immidiately """ - import plugins + import plugins, config plugin_functions = filter( - lambda x: x[0].startswith("command") and x[1].plugin_type == 'command', + lambda x: hasattr(x[1], 'plugin_type') and x[1].plugin_type == 'command', plugins.__dict__.items() ) + # fixture + config.runtime_config_store['other_bots'].append('pork') + for p in plugin_functions: func = p[1] msg_obj = { 'body': '{}: {}'.format(self.bot_nickname, func.plugin_name), - 'mucnick': 'hans' + 'mucnick': config.conf_get('bot_owner') } plugin_arguments = { @@ -201,7 +204,9 @@ class TestPlugins(unittest.TestCase): 'choose': ['A', 'B'], 'decode': ['@'], 'record': ['urlbug', 'this', 'is', 'sparta'], - # 'teatimer' invalid format string + 'flausch': ['hans'], + 'set-status': ['unmute'], + 'remove-from-botlist': ['pork'], }