forked from p15670423/monkey
island, tests: Run isort and black on previously changed files
This commit is contained in:
parent
5abcadc69a
commit
e01165403a
|
@ -1,8 +1,8 @@
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from monkey_island.cc.server_utils.file_utils import is_windows_os
|
|
||||||
from monkey_island.cc.server_utils import file_utils
|
from monkey_island.cc.server_utils import file_utils
|
||||||
|
from monkey_island.cc.server_utils.file_utils import is_windows_os
|
||||||
|
|
||||||
__author__ = "itay.mizeretz"
|
__author__ = "itay.mizeretz"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import platform
|
import platform
|
||||||
import stat
|
import stat
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ from typing import Tuple
|
||||||
|
|
||||||
from monkey_island.cc.arg_parser import IslandCmdArgs
|
from monkey_island.cc.arg_parser import IslandCmdArgs
|
||||||
from monkey_island.cc.environment import server_config_handler
|
from monkey_island.cc.environment import server_config_handler
|
||||||
from monkey_island.cc.server_utils.file_utils import create_secure_directory
|
|
||||||
from monkey_island.cc.server_utils import file_utils
|
from monkey_island.cc.server_utils import file_utils
|
||||||
from monkey_island.cc.server_utils.consts import DEFAULT_SERVER_CONFIG_PATH
|
from monkey_island.cc.server_utils.consts import DEFAULT_SERVER_CONFIG_PATH
|
||||||
|
from monkey_island.cc.server_utils.file_utils import create_secure_directory
|
||||||
from monkey_island.cc.setup.island_config_options import IslandConfigOptions
|
from monkey_island.cc.setup.island_config_options import IslandConfigOptions
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import stat
|
import stat
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -7,8 +6,8 @@ import pytest
|
||||||
from monkey_island.cc.server_utils.file_utils import (
|
from monkey_island.cc.server_utils.file_utils import (
|
||||||
create_secure_directory,
|
create_secure_directory,
|
||||||
create_secure_file,
|
create_secure_file,
|
||||||
|
expand_path,
|
||||||
is_windows_os,
|
is_windows_os,
|
||||||
expand_path
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if is_windows_os():
|
if is_windows_os():
|
||||||
|
@ -19,7 +18,6 @@ if is_windows_os():
|
||||||
ACE_TYPE_ALLOW = 0
|
ACE_TYPE_ALLOW = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_expand_user(patched_home_env):
|
def test_expand_user(patched_home_env):
|
||||||
input_path = os.path.join("~", "test")
|
input_path = os.path.join("~", "test")
|
||||||
expected_path = os.path.join(patched_home_env, "test")
|
expected_path = os.path.join(patched_home_env, "test")
|
||||||
|
@ -33,6 +31,7 @@ def test_expand_vars(patched_home_env):
|
||||||
|
|
||||||
assert expand_path(input_path) == expected_path
|
assert expand_path(input_path) == expected_path
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def test_path_nested(tmpdir):
|
def test_path_nested(tmpdir):
|
||||||
path = os.path.join(tmpdir, "test1", "test2", "test3")
|
path = os.path.join(tmpdir, "test1", "test2", "test3")
|
||||||
|
|
Loading…
Reference in New Issue