From d52e80a3f3c92e96c86e529526aa7c72a70f34d7 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 24 May 2021 14:03:49 +0300 Subject: [PATCH] Improved the readability IslandConfigOptions test --- .../monkey_island/setup/test_island_config_options.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/setup/test_island_config_options.py b/monkey/tests/unit_tests/monkey_island/setup/test_island_config_options.py index 564df30a0..0e79e0324 100644 --- a/monkey/tests/unit_tests/monkey_island/setup/test_island_config_options.py +++ b/monkey/tests/unit_tests/monkey_island/setup/test_island_config_options.py @@ -1,20 +1,18 @@ from monkey_island.cc.server_utils.consts import DEFAULT_LOG_LEVEL, DEFAULT_START_MONGO_DB from monkey_island.setup.island_config_options import IslandConfigOptions -MOCKED_CONFIG_FILE_CONTENTS_STANDARD = {"data_dir": "/tmp", "mongodb": {"start_mongodb": False}} +TEST_CONFIG_FILE_CONTENTS_STANDARD = {"data_dir": "/tmp", "mongodb": {"start_mongodb": False}} -MOCKED_CONFIG_FILE_CONTENTS_NO_STARTMONGO = {"data_dir": "/tmp", "mongodb": {}} +TEST_CONFIG_FILE_CONTENTS_NO_STARTMONGO = {"data_dir": "/tmp", "mongodb": {}} def test_island_config_options__standard(): - options = IslandConfigOptions(MOCKED_CONFIG_FILE_CONTENTS_STANDARD) + options = IslandConfigOptions(TEST_CONFIG_FILE_CONTENTS_STANDARD) assert not options.start_mongodb assert options.data_dir == "/tmp" assert options.log_level == DEFAULT_LOG_LEVEL def test_island_config_options__no_starmongo(): - options = IslandConfigOptions(MOCKED_CONFIG_FILE_CONTENTS_NO_STARTMONGO) + options = IslandConfigOptions(TEST_CONFIG_FILE_CONTENTS_NO_STARTMONGO) assert options.start_mongodb == DEFAULT_START_MONGO_DB - assert options.data_dir == "/tmp" - assert options.log_level == DEFAULT_LOG_LEVEL