From f52f8eccd5354c6a4b2550db9b4944bc8919e6e6 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 14 Sep 2022 09:19:56 -0400 Subject: [PATCH] UT: Use sets for simpler sequence comparison --- monkey/tests/unit_tests/monkey_island/cc/models/test_node.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/models/test_node.py b/monkey/tests/unit_tests/monkey_island/cc/models/test_node.py index 763b96fb3..74a83860c 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/models/test_node.py +++ b/monkey/tests/unit_tests/monkey_island/cc/models/test_node.py @@ -42,9 +42,7 @@ def test_serialization(): assert len(serialized_node["connections"]) == len(node_dict["connections"]) for key, value in serialized_node["connections"].items(): - set_a = set(value) - set_b = node_dict["connections"][key] - len(set_a.intersection(set_b)) == len(set_a) == len(set_b) == len(value) + assert set(value) == set(node_dict["connections"][key]) def test_machine_id_immutable():