From e57e28a97f592327d7109480275eb1e71f5da994 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 3 Jun 2021 19:39:43 -0400 Subject: [PATCH] island: Consolidate tests for consts.py --- .../monkey_island/cc/server_utils/test_consts.py | 11 +++++++++++ .../tests/unit_tests/monkey_island/cc/test_consts.py | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 monkey/tests/unit_tests/monkey_island/cc/test_consts.py diff --git a/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_consts.py b/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_consts.py index eeb600b9b..a88f0c64b 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_consts.py +++ b/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_consts.py @@ -1,5 +1,16 @@ +import platform + from monkey_island.cc.server_utils import consts def test_monkey_island_abs_path(): assert consts.MONKEY_ISLAND_ABS_PATH.endswith("monkey_island") + + +def test_default_server_config_file_path(): + if platform.system() == "Windows": + server_file_path = f"{consts.MONKEY_ISLAND_ABS_PATH}\\cc\\{consts.SERVER_CONFIG_FILENAME}" + else: + server_file_path = f"{consts.MONKEY_ISLAND_ABS_PATH}/cc/{consts.SERVER_CONFIG_FILENAME}" + + assert consts.DEFAULT_SERVER_CONFIG_PATH == server_file_path diff --git a/monkey/tests/unit_tests/monkey_island/cc/test_consts.py b/monkey/tests/unit_tests/monkey_island/cc/test_consts.py deleted file mode 100644 index 600766aeb..000000000 --- a/monkey/tests/unit_tests/monkey_island/cc/test_consts.py +++ /dev/null @@ -1,12 +0,0 @@ -import platform - -import monkey_island.cc.server_utils.consts as consts - - -def test_default_server_config_file_path(): - if platform.system() == "Windows": - server_file_path = f"{consts.MONKEY_ISLAND_ABS_PATH}\\cc\\{consts.SERVER_CONFIG_FILENAME}" - else: - server_file_path = f"{consts.MONKEY_ISLAND_ABS_PATH}/cc/{consts.SERVER_CONFIG_FILENAME}" - - assert consts.DEFAULT_SERVER_CONFIG_PATH == server_file_path