mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-30 20:36:26 -06:00
15093 add test
This commit is contained in:
parent
65bede04f2
commit
e1469b2d25
@ -17,6 +17,9 @@ class DummyPluginConfig(PluginConfig):
|
||||
'testing-medium',
|
||||
'testing-high'
|
||||
]
|
||||
events_pipeline = [
|
||||
'netbox.tests.dummy_plugin.events.process_events_queue'
|
||||
]
|
||||
|
||||
|
||||
config = DummyPluginConfig
|
||||
|
2
netbox/netbox/tests/dummy_plugin/events.py
Normal file
2
netbox/netbox/tests/dummy_plugin/events.py
Normal file
@ -0,0 +1,2 @@
|
||||
def process_events_queue(events):
|
||||
pass
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user