From 9b4de6bab8303a93daef49b8d72abc6361689149 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 27 Sep 2022 13:11:13 +0530 Subject: [PATCH] UT: Use SocketAddress.from_string() in test_handle_agent_registration.py --- .../island_event_handlers/test_handle_agent_registration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 61337b022..dff59f5d3 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 @@ -27,12 +27,14 @@ MACHINE = Machine( network_interfaces=[IPv4Interface("192.168.2.2/24")], ) +IP = "192.168.1.1:5000" + AGENT_REGISTRATION_DATA = AgentRegistrationData( id=AGENT_ID, machine_hardware_id=MACHINE.hardware_id, start_time=0, parent_id=None, - cc_server=SocketAddress(ip="192.168.1.1", port="5000"), + cc_server=SocketAddress.from_string(IP), network_interfaces=[IPv4Interface("192.168.1.2/24")], )