Rename unit test functions in test_island_logger.py
This commit is contained in:
parent
5f8145e3d1
commit
83a235bb5d
|
@ -4,11 +4,11 @@ import os
|
|||
from monkey_island.cc.server_utils.island_logger import ISLAND_LOG_FILENAME, setup_logging
|
||||
|
||||
|
||||
def test_setup_logging_log_level_debug(tmpdir):
|
||||
def test_setup_logging_file_log_level_debug(tmpdir):
|
||||
DATA_DIR = tmpdir
|
||||
LOG_FILE = os.path.join(DATA_DIR, ISLAND_LOG_FILENAME)
|
||||
LOG_LEVEL = "DEBUG"
|
||||
TEST_STRING = "Hello, Monkey! (Log level: debug)"
|
||||
TEST_STRING = "Hello, Monkey! (File; Log level: debug)"
|
||||
|
||||
setup_logging(DATA_DIR, LOG_LEVEL)
|
||||
|
||||
|
@ -21,11 +21,11 @@ def test_setup_logging_log_level_debug(tmpdir):
|
|||
assert TEST_STRING in line
|
||||
|
||||
|
||||
def test_setup_logging_log_level_info(tmpdir):
|
||||
def test_setup_logging_file_log_level_info(tmpdir):
|
||||
DATA_DIR = tmpdir
|
||||
LOG_FILE = os.path.join(DATA_DIR, ISLAND_LOG_FILENAME)
|
||||
LOG_LEVEL = "INFO"
|
||||
TEST_STRING = "Hello, Monkey! (Log level: info)"
|
||||
TEST_STRING = "Hello, Monkey! (File; Log level: info)"
|
||||
|
||||
setup_logging(DATA_DIR, LOG_LEVEL)
|
||||
|
||||
|
@ -41,7 +41,7 @@ def test_setup_logging_log_level_info(tmpdir):
|
|||
def test_setup_logging_console_log_level_debug(capsys, tmpdir):
|
||||
DATA_DIR = tmpdir
|
||||
LOG_LEVEL = "DEBUG"
|
||||
TEST_STRING = "Hello, Monkey! (Log level: debug)"
|
||||
TEST_STRING = "Hello, Monkey! (Console; Log level: debug)"
|
||||
|
||||
setup_logging(DATA_DIR, LOG_LEVEL)
|
||||
|
||||
|
@ -55,7 +55,7 @@ def test_setup_logging_console_log_level_debug(capsys, tmpdir):
|
|||
def test_setup_logging_console_log_level_info(capsys, tmpdir):
|
||||
DATA_DIR = tmpdir
|
||||
LOG_LEVEL = "INFO"
|
||||
TEST_STRING = "Hello, Monkey! (Log level: info)"
|
||||
TEST_STRING = "Hello, Monkey! (Console; Log level: info)"
|
||||
|
||||
setup_logging(DATA_DIR, LOG_LEVEL)
|
||||
|
||||
|
|
Loading…
Reference in New Issue