Skip to content

Commit

Permalink
fix: fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekzyla committed Aug 1, 2023
1 parent c9b6dfc commit 183f208
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 183f208

Please sign in to comment.