forked from p34709852/monkey
island: Consolidate tests for consts.py
This commit is contained in:
parent
5ecc02d553
commit
e57e28a97f
|
@ -1,5 +1,16 @@
|
||||||
|
import platform
|
||||||
|
|
||||||
from monkey_island.cc.server_utils import consts
|
from monkey_island.cc.server_utils import consts
|
||||||
|
|
||||||
|
|
||||||
def test_monkey_island_abs_path():
|
def test_monkey_island_abs_path():
|
||||||
assert consts.MONKEY_ISLAND_ABS_PATH.endswith("monkey_island")
|
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
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in New Issue