Tests: Move raise_() to a reusable location

This commit is contained in:
Mike Salvatore 2021-07-13 10:30:38 -04:00
parent c56ca37bc0
commit acdfeb858f
2 changed files with 5 additions and 4 deletions

View File

@ -2,15 +2,12 @@ import os
import pytest import pytest
from tests.monkey_island.utils import assert_windows_permissions 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.server_utils.file_utils import is_windows_os
from monkey_island.cc.services.post_breach_files import PostBreachFilesService from monkey_island.cc.services.post_breach_files import PostBreachFilesService
def raise_(ex):
raise ex
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def custom_pba_directory(tmpdir): def custom_pba_directory(tmpdir):
PostBreachFilesService.initialize(tmpdir) PostBreachFilesService.initialize(tmpdir)

View File

@ -18,3 +18,7 @@ def hash_file(filepath: Path):
sha256.update(block) sha256.update(block)
return sha256.hexdigest() return sha256.hexdigest()
def raise_(ex):
raise ex