diff --git a/pokecli.py b/pokecli.py index 24a0f38ee3..a77cf378c9 100644 --- a/pokecli.py +++ b/pokecli.py @@ -446,7 +446,7 @@ def task_configuration_error(flag_name): plugin_loader = PluginLoader() for plugin in config.plugins: - plugin_loader.load_path(plugin) + plugin_loader.load_plugin(plugin) # create web dir if not exists try: diff --git a/pokemongo_bot/plugin_loader.py b/pokemongo_bot/plugin_loader.py index 3bded030b3..9362197bc8 100644 --- a/pokemongo_bot/plugin_loader.py +++ b/pokemongo_bot/plugin_loader.py @@ -15,7 +15,7 @@ def _get_correct_path(self, path): return correct_path - def load_path(self, path): + def load_plugin(self, path): correct_path = self._get_correct_path(path) if correct_path not in self.folder_cache: diff --git a/pokemongo_bot/test/plugin_loader_test.py b/pokemongo_bot/test/plugin_loader_test.py index 4d4d5ca952..38a566b35c 100644 --- a/pokemongo_bot/test/plugin_loader_test.py +++ b/pokemongo_bot/test/plugin_loader_test.py @@ -15,14 +15,14 @@ def setUp(self): def test_load_namespace_class(self): package_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'resources', 'plugin_fixture') - self.plugin_loader.load_path(package_path) + self.plugin_loader.load_plugin(package_path) loaded_class = self.plugin_loader.get_class('plugin_fixture.FakeTask') self.assertEqual(loaded_class({}, {}).work(), 'FakeTask') self.plugin_loader.remove_path(package_path) def test_load_zip(self): package_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'resources', 'plugin_fixture_test.zip') - self.plugin_loader.load_path(package_path) + self.plugin_loader.load_plugin(package_path) loaded_class = self.plugin_loader.get_class('plugin_fixture_test.FakeTask') self.assertEqual(loaded_class({}, {}).work(), 'FakeTask') self.plugin_loader.remove_path(package_path) diff --git a/tests/tree_config_builder_test.py b/tests/tree_config_builder_test.py index cd8bed22e0..1992c8187c 100644 --- a/tests/tree_config_builder_test.py +++ b/tests/tree_config_builder_test.py @@ -89,7 +89,7 @@ def test_task_with_config(self): def test_load_plugin_task(self): package_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'resources', 'plugin_fixture') plugin_loader = PluginLoader() - plugin_loader.load_path(package_path) + plugin_loader.load_plugin(package_path) obj = convert_from_json("""[{ "type": "plugin_fixture.FakeTask" @@ -103,7 +103,7 @@ def test_load_plugin_task(self): def setupUnsupportedBuilder(self): package_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'pokemongo_bot', 'test', 'resources', 'plugin_fixture') plugin_loader = PluginLoader() - plugin_loader.load_path(package_path) + plugin_loader.load_plugin(package_path) obj = convert_from_json("""[{ "type": "plugin_fixture.UnsupportedApiTask"