Skip to content
Snippets Groups Projects
Commit 3acd8e0d authored by Erik Reid's avatar Erik Reid
Browse files

mock InventoryTask.update_status

update_status uses result backend, which seems very hard to mock
parent 5e711af5
No related branches found
No related tags found
No related merge requests found
......@@ -133,9 +133,11 @@ def test_reload_router_config(mocked_worker_module, router, mocker):
'inventory_provider.tasks.worker.snmp_refresh_interfaces.apply',
_mocked_snmp_refresh_interfaces_apply)
def _mocked_update_status(self, **kwargs):
pass
mocker.patch(
'inventory_provider.tasks.worker.snmp_refresh_interfaces.apply',
_mocked_snmp_refresh_interfaces_apply)
'inventory_provider.tasks.worker.InventoryTask.update_state',
_mocked_update_status)
worker.reload_router_config(router)
assert 'netconf:' + router in MockedRedis.db
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment