From d3c9691dfe7df095fcb50ed50762def629ba25fd Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 28 Sep 2022 15:47:58 -0400 Subject: [PATCH] UT: Add assertion to PingScanEvent serialization tests --- .../common/agent_events/test_ping_scan_event.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/monkey/tests/unit_tests/common/agent_events/test_ping_scan_event.py b/monkey/tests/unit_tests/common/agent_events/test_ping_scan_event.py index 173fff226..43f65c754 100644 --- a/monkey/tests/unit_tests/common/agent_events/test_ping_scan_event.py +++ b/monkey/tests/unit_tests/common/agent_events/test_ping_scan_event.py @@ -9,7 +9,11 @@ from common import OperatingSystem from common.agent_events import PingScanEvent PING_EVENT = PingScanEvent( - source=AGENT_ID, target=IPv4Address("1.1.1.1"), response_received=True, os=OperatingSystem.LINUX + source=AGENT_ID, + target=IPv4Address("1.1.1.1"), + timestamp=1664371327.4067292, + response_received=True, + os=OperatingSystem.LINUX, ) PING_OBJECT_DICT = { @@ -32,13 +36,11 @@ PING_SIMPLE_DICT = { def test_constructor(): - # Raises exception_on_failure - PingScanEvent(**PING_OBJECT_DICT) + assert PingScanEvent(**PING_OBJECT_DICT) == PING_EVENT def test_from_dict(): - # Raises exception_on_failure - PingScanEvent(**PING_SIMPLE_DICT) + assert PingScanEvent(**PING_SIMPLE_DICT) == PING_EVENT def test_to_dict():