forked from p15670423/monkey
Fix/ignore flake8 and fix isort warnings
This commit is contained in:
parent
cd2f627cc1
commit
dc8e2b018d
|
@ -4,7 +4,7 @@ from monkey_island.cc.arg_parser import IslandCmdArgs
|
|||
from monkey_island.cc.environment import server_config_handler
|
||||
from monkey_island.cc.environment.utils import create_secure_directory
|
||||
from monkey_island.cc.server_utils import file_utils
|
||||
from monkey_island.cc.server_utils.consts import DEFAULT_DATA_DIR, DEFAULT_SERVER_CONFIG_PATH
|
||||
from monkey_island.cc.server_utils.consts import DEFAULT_SERVER_CONFIG_PATH
|
||||
from monkey_island.cc.setup.island_config_options import IslandConfigOptions
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
import pytest
|
||||
import subprocess
|
||||
|
||||
from monkey_island.cc.server_utils import file_utils
|
||||
|
||||
|
@ -45,7 +45,7 @@ def test_has_expected_permissions_true_windows(tmpdir, create_empty_file):
|
|||
file_name = f"{tmpdir}/test"
|
||||
|
||||
create_empty_file(file_name)
|
||||
subprocess.run(f"echo y| cacls {file_name} /p %USERNAME%:F", shell=True)
|
||||
subprocess.run(f"echo y| cacls {file_name} /p %USERNAME%:F", shell=True) # noqa: DUO116
|
||||
|
||||
assert file_utils.has_expected_permissions(file_name, 2032127)
|
||||
|
||||
|
@ -55,6 +55,6 @@ def test_has_expected_permissions_false_windows(tmpdir, create_empty_file):
|
|||
file_name = f"{tmpdir}/test"
|
||||
|
||||
create_empty_file(file_name)
|
||||
subprocess.run(f"echo y| cacls {file_name} /p %USERNAME%:R", shell=True)
|
||||
subprocess.run(f"echo y| cacls {file_name} /p %USERNAME%:R", shell=True) # noqa: DUO116
|
||||
|
||||
assert not file_utils.has_expected_permissions(file_name, 2032127)
|
||||
|
|
Loading…
Reference in New Issue