From dc8e2b018d8f1bc772fdc4f987d369d2ae5ebbbe Mon Sep 17 00:00:00 2001 From: shreyamalviya Date: Wed, 9 Jun 2021 16:12:51 +0530 Subject: [PATCH] Fix/ignore flake8 and fix isort warnings --- monkey/monkey_island/cc/setup/config_setup.py | 2 +- .../monkey_island/cc/server_utils/test_file_utils.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/setup/config_setup.py b/monkey/monkey_island/cc/setup/config_setup.py index 3621ea7fc..110df9f41 100644 --- a/monkey/monkey_island/cc/setup/config_setup.py +++ b/monkey/monkey_island/cc/setup/config_setup.py @@ -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 diff --git a/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_file_utils.py b/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_file_utils.py index cfe7d0e77..e912ca043 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_file_utils.py +++ b/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_file_utils.py @@ -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)