forked from p15670423/monkey
Tests: Move raise_() to a reusable location
This commit is contained in:
parent
c56ca37bc0
commit
acdfeb858f
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue