diff --git a/backend/tests/ui_handling/get_endpoints/test_get_endpoints.py b/backend/tests/ui_handling/get_endpoints/test_get_endpoints.py index 9f61018..1f23225 100644 --- a/backend/tests/ui_handling/get_endpoints/test_get_endpoints.py +++ b/backend/tests/ui_handling/get_endpoints/test_get_endpoints.py @@ -267,8 +267,9 @@ def test_get_devices_of_group(m_client, client): assert response.json == third_result +@mock.patch("SC4SNMP_UI_backend.inventory.routes.get_inventory_type") @mock.patch("pymongo.cursor.Cursor.limit") -def test_get_inventory_list(m_cursor, client): +def test_get_inventory_list(m_cursor, m_get_inventory_type, client): common_id = "635916b2c8cb7a15f28af40a" m_cursor.side_effect = [ @@ -317,6 +318,8 @@ def test_get_inventory_list(m_cursor, client): ] ] + m_get_inventory_type.side_effect = ["Host", "Group", "Group"] + first_result = [ { "_id": common_id,