From f7f00478687d4a0b4d787fa2863d7141c2f64bdc Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 30 Aug 2022 23:57:48 +0530 Subject: [PATCH] UT: Simplify assertion logic in test_agent_configuration_endpoint --- .../monkey_island/cc/resources/test_agent_configuration.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py b/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py index f3a8abdb0..b8c417e6d 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py +++ b/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py @@ -5,7 +5,6 @@ from tests.common import StubDIContainer from tests.common.example_agent_configuration import AGENT_CONFIGURATION from tests.monkey_island import InMemoryAgentConfigurationRepository from tests.unit_tests.monkey_island.conftest import get_url_for_resource -from tests.utils import convert_all_lists_to_tuples_in_mapping from common.agent_configuration import AgentConfiguration from monkey_island.cc.repository import IAgentConfigurationRepository @@ -35,9 +34,7 @@ def test_agent_configuration_endpoint(flask_client): assert resp.status_code == 200 - assert convert_all_lists_to_tuples_in_mapping( - json.loads(resp.data) - ) == convert_all_lists_to_tuples_in_mapping(AGENT_CONFIGURATION.copy()) + assert AgentConfiguration(**json.loads(resp.data)) == AgentConfiguration(**AGENT_CONFIGURATION) def test_agent_configuration_invalid_config(flask_client):