Skip to content
Snippets Groups Projects
Commit 4d5719ea authored by Robert Latta's avatar Robert Latta
Browse files

added SID retrieval to test

parent c07a65f4
Branches
Tags 0.9
No related merge requests found
......@@ -56,6 +56,14 @@ def test_extract_ims_data(mocker):
{'port_a_id': '2', 'value': '2A'}
]
)
mocker.patch(
'inventory_provider.tasks.worker.ims_data.get_ids_and_sids',
return_value=(x for x in [
(111111, 'SID-01'),
(111112, 'SID-02'),
(111113, 'SID-03')
])
)
res = extract_ims_data()
assert res['locations'] == {'loc_a': 'LOC A', 'loc_b': 'LOC B'}
assert res['lg_routers'] == ['lg router 1', 'lg router 2']
......@@ -81,6 +89,11 @@ def test_extract_ims_data(mocker):
],
'2': [{'port_a_id': '2', 'value': '2A'}]
}
assert res['circuit_ids_sids'] == {
111111: 'SID-01',
111112: 'SID-02',
111113: 'SID-03'
}
def test_transform_ims_data():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment