mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-31 21:06:25 -06:00
15093 add test
This commit is contained in:
parent
65bede04f2
commit
e1469b2d25
@ -17,6 +17,9 @@ class DummyPluginConfig(PluginConfig):
|
|||||||
'testing-medium',
|
'testing-medium',
|
||||||
'testing-high'
|
'testing-high'
|
||||||
]
|
]
|
||||||
|
events_pipeline = [
|
||||||
|
'netbox.tests.dummy_plugin.events.process_events_queue'
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
config = DummyPluginConfig
|
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, 'foo'), 123)
|
||||||
self.assertEqual(get_plugin_config(plugin, 'bar'), None)
|
self.assertEqual(get_plugin_config(plugin, 'bar'), None)
|
||||||
self.assertEqual(get_plugin_config(plugin, 'bar', default=456), 456)
|
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