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

updated tests

parent 2bd56d7f
No related branches found
No related tags found
No related merge requests found
......@@ -21,9 +21,14 @@ def test_extract_ims_data(mocker):
return_value=['lg router 1', 'lg router 2']
)
mocker.patch(
'inventory_provider.tasks.worker.ims_data.get_customer_service_emails',
'inventory_provider.tasks.worker.ims_data.get_customer_tts_contacts',
return_value=[('123', 'CON A'), ('456', 'CON B')]
)
mocker.patch(
'inventory_provider.tasks.worker.ims_data.'
'get_customer_planned_work_contacts',
return_value=[('223', 'CON PW A'), ('556', 'CON PW B')]
)
mocker.patch(
'inventory_provider.tasks.worker.ims_data.get_monitored_circuit_ids',
return_value=[123, 456, 789]
......@@ -80,6 +85,8 @@ def test_extract_ims_data(mocker):
assert res['locations'] == {'loc_a': 'LOC A', 'loc_b': 'LOC B'}
assert res['lg_routers'] == ['lg router 1', 'lg router 2']
assert res['customer_contacts'] == {'123': 'CON A', '456': 'CON B'}
assert res['planned_work_contacts'] == \
{'223': 'CON PW A', '556': 'CON PW B'}
assert res['circuit_ids_to_monitor'] == [123, 456, 789]
assert res['additional_circuit_customers'] == \
[
......@@ -152,6 +159,11 @@ def test_transform_ims_data():
"cu_1_1": ["customer_1_1@a.org"]
}
planned_work_contacts = {
"cu_1": ["customer_1_PW@a.org"],
"cu_1_1": ["customer_1_1_PW@a.org"]
}
port_id_details = {
"port_id_1": [{
"equipment_name": "eq_a",
......@@ -320,6 +332,7 @@ def test_transform_ims_data():
data = {
"locations": locations,
"customer_contacts": customer_contacts,
"planned_work_contacts": planned_work_contacts,
"circuit_ids_to_monitor": ["sub_circuit_2"],
"additional_circuit_customers": additional_circuit_customer_ids,
"hierarchy": hierarchy,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment