From 7afe0818e549b641f125431c09e2e9271d12035c Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 28 Jun 2021 14:07:06 +0530 Subject: [PATCH] tests: Use `is_windows_os()` while skipping tests in test_post_breach_files.py --- .../monkey_island/cc/services/test_post_breach_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/services/test_post_breach_files.py b/monkey/tests/unit_tests/monkey_island/cc/services/test_post_breach_files.py index eea4ec941..cc21bd97a 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/services/test_post_breach_files.py +++ b/monkey/tests/unit_tests/monkey_island/cc/services/test_post_breach_files.py @@ -41,7 +41,7 @@ def dir_is_empty(dir_path): return len(dir_contents) == 0 -@pytest.mark.skipif(os.name != "posix", reason="Tests Posix (not Windows) permissions.") +@pytest.mark.skipif(is_windows_os(), reason="Tests Posix (not Windows) permissions.") def test_custom_pba_dir_permissions_linux(): st = os.stat(PostBreachFilesService.get_custom_pba_directory()) @@ -57,7 +57,7 @@ def _get_acl_and_sid_from_path(path: str): return acl, sid -@pytest.mark.skipif(os.name == "posix", reason="Tests Windows (not Posix) permissions.") +@pytest.mark.skipif(not is_windows_os(), reason="Tests Windows (not Posix) permissions.") def test_custom_pba_dir_permissions_windows(): pba_dir = PostBreachFilesService.get_custom_pba_directory()