From 3e2244cd62e6fd912a2a40483b87879390b763ad Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 29 Aug 2022 20:23:56 -0400 Subject: [PATCH] UT: Add test_operating_system_default_value() --- .../unit_tests/monkey_island/cc/models/test_machine.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/monkey/tests/unit_tests/monkey_island/cc/models/test_machine.py b/monkey/tests/unit_tests/monkey_island/cc/models/test_machine.py index a2e712a25..a81f1823f 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/models/test_machine.py +++ b/monkey/tests/unit_tests/monkey_island/cc/models/test_machine.py @@ -164,6 +164,15 @@ def test_operating_system_set_invalid_value(): m.operating_system = "MacOS" +def test_operating_system_default_value(): + missing_operating_system_dict = MACHINE_OBJECT_DICT.copy() + del missing_operating_system_dict["operating_system"] + + m = Machine(**missing_operating_system_dict) + + assert m.operating_system is None + + def test_set_operating_system_version(): m = Machine(**MACHINE_OBJECT_DICT)