diff --git a/monkey/tests/unit_tests/monkey_island/cc/services/test_post_breach_files.py b/monkey/tests/unit_tests/monkey_island/cc/services/test_post_breach_files.py index 5a2ddaa17..90a649a39 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/services/test_post_breach_files.py +++ b/monkey/tests/unit_tests/monkey_island/cc/services/test_post_breach_files.py @@ -2,15 +2,12 @@ import os import pytest from tests.monkey_island.utils import assert_windows_permissions +from tests.utils import raise_ from monkey_island.cc.server_utils.file_utils import is_windows_os from monkey_island.cc.services.post_breach_files import PostBreachFilesService -def raise_(ex): - raise ex - - @pytest.fixture(autouse=True) def custom_pba_directory(tmpdir): PostBreachFilesService.initialize(tmpdir) diff --git a/monkey/tests/utils.py b/monkey/tests/utils.py index 2be032aad..8aea2d007 100644 --- a/monkey/tests/utils.py +++ b/monkey/tests/utils.py @@ -18,3 +18,7 @@ def hash_file(filepath: Path): sha256.update(block) return sha256.hexdigest() + + +def raise_(ex): + raise ex