def test_start_calls_register_for_each_plugins_from_array(self): plugin_class = Plugin with patch.object(Plugin, 'register', wraps=plugin_class.register) as register_wrap: Plugin.start(self.working_plugins_list) self.assertEqual(len(self.working_plugins_list), register_wrap.call_count)
def setUpClass(cls): Plugin.clear() Plugin.start(['dummy', 'dummy_datasource', 'webui', 'ram_sessions'])
def test_clear_effectively_allow_fresh_new_plugin_reloading(self): Plugin.start(self.working_plugins_list) Plugin.clear() Plugin.start(self.working_plugins_list)