15093 add test

This commit is contained in:
Arthur Hanson 2024-10-18 07:29:28 -07:00
parent 65bede04f2
commit e1469b2d25
3 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,9 @@ class DummyPluginConfig(PluginConfig):
'testing-medium',
'testing-high'
]
events_pipeline = [
'netbox.tests.dummy_plugin.events.process_events_queue'
]
config = DummyPluginConfig

View File

@ -0,0 +1,2 @@
def process_events_queue(events):
pass

View File

@ -203,3 +203,10 @@ class PluginTest(TestCase):
self.assertEqual(get_plugin_config(plugin, 'foo'), 123)
self.assertEqual(get_plugin_config(plugin, 'bar'), None)
self.assertEqual(get_plugin_config(plugin, 'bar', default=456), 456)
def test_events_pipeline(self):
"""
Check that events pipeline is registered.
"""
self.assertIn('netbox.tests.dummy_plugin.events.process_events_queue', settings.EVENTS_PIPELINE)