diff --git a/monkey/tests/unit_tests/monkey_island/cc/setup/test_process_runner.py b/monkey/tests/unit_tests/monkey_island/cc/setup/test_process_runner.py index 5aa4e697b..5a6870dc2 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/setup/test_process_runner.py +++ b/monkey/tests/unit_tests/monkey_island/cc/setup/test_process_runner.py @@ -7,9 +7,13 @@ from monkey_island.cc.setup.mongo_process_runner import MongoDbRunner TEST_DIR_NAME = "test_dir" +@pytest.fixture(autouse=True) +def fake_db_dir(monkeypatch, tmpdir): + monkeypatch.setattr("monkey_island.cc.setup.mongo_process_runner.DB_DIR_NAME", TEST_DIR_NAME) + + @pytest.fixture def expected_path(monkeypatch, tmpdir): - monkeypatch.setattr("monkey_island.cc.setup.mongo_process_runner.DB_DIR_NAME", TEST_DIR_NAME) expected_path = os.path.join(tmpdir, TEST_DIR_NAME) return expected_path diff --git a/whitelist.py b/whitelist.py index 51d4c22b8..6739d4791 100644 --- a/whitelist.py +++ b/whitelist.py @@ -166,6 +166,8 @@ IBM # unused variable (monkey/common/cloud/environment_names.py:11) DigitalOcean # unused variable (monkey/common/cloud/environment_names.py:12) _.aws_info # unused attribute (monkey/monkey_island/cc/environment/aws.py:13) build_from_config_file_contents # unused method 'build_from_config_file_contents' (\monkey_island\setup\island_config_options.py:18) +fake_db_dir # unused function 'fake_db_dir' (monkey/tests/unit_tests/monkey_island/cc/setup/test_process_runner.py:10) + # these are not needed for it to work, but may be useful extra information to understand what's going on WINDOWS_PBA_TYPE # unused variable (monkey/monkey_island/cc/resources/pba_file_upload.py:23)