From 284f58afaffbe906995c22fc338be95a26406113 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 21 Sep 2022 20:37:30 -0400 Subject: [PATCH] UT: Sort updated_machine.network_interfaces --- .../test_handle_agent_registration.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/island_event_handlers/test_handle_agent_registration.py b/monkey/tests/unit_tests/monkey_island/cc/island_event_handlers/test_handle_agent_registration.py index 4386469be..c6070f1ed 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/island_event_handlers/test_handle_agent_registration.py +++ b/monkey/tests/unit_tests/monkey_island/cc/island_event_handlers/test_handle_agent_registration.py @@ -222,14 +222,12 @@ def test_machine_interfaces_updated(handler, machine_repository): IPv4Interface("192.168.1.4/24"), ], ) - expected_network_interfaces = tuple( - sorted( - (*agent_registration_data.network_interfaces, existing_machine.network_interfaces[-1]) - ) + expected_network_interfaces = sorted( + (*agent_registration_data.network_interfaces, existing_machine.network_interfaces[-1]) ) handler(agent_registration_data) updated_machine = machine_repository.upsert_machine.call_args_list[0][0][0] - actual_network_interfaces = updated_machine.network_interfaces + actual_network_interfaces = sorted(updated_machine.network_interfaces) assert actual_network_interfaces == expected_network_interfaces