maiorBoltach commented on a change in pull request #10878:
URL: https://github.com/apache/airflow/pull/10878#discussion_r488506722



##########
File path: tests/plugins/test_plugins_manager.py
##########
@@ -121,6 +121,39 @@ class TestNonPropertyHook(BaseHook):
             self.assertIn('PluginPropertyOperator', 
str(plugins_manager.operators_modules[0].__dict__))
             self.assertIn("TestNonPropertyHook", 
str(plugins_manager.hooks_modules[0].__dict__))
 
+    def test_should_fail_on_register_plugin_with_incorrect_load(self):
+        class TestNonPropertyHook(BaseHook):
+            pass
+
+        class AirflowTestPlugin(AirflowPlugin):
+            name = "test_plugin"
+
+            hooks = []
+
+            @classmethod
+            def on_load(cls, *args, **kwargs):
+                cls.hooks.append(TestNonPropertyHook)
+
+        with mock_plugin_manager(plugins=[]):
+            from airflow import plugins_manager
+
+            plugins_manager.register_plugin(AirflowTestPlugin)
+            self.assertListEqual(plugins_manager.plugins, [AirflowTestPlugin])
+
+    def test_should_register_plugin(self):

Review comment:
       Thanks, mixed up the names of the methods




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to