tests: Use `is_windows_os()` while skipping tests in test_post_breach_files.py

This commit is contained in:
Shreya 2021-06-28 14:07:06 +05:30
parent 7211d59a38
commit 7afe0818e5
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ def dir_is_empty(dir_path):
return len(dir_contents) == 0 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(): def test_custom_pba_dir_permissions_linux():
st = os.stat(PostBreachFilesService.get_custom_pba_directory()) st = os.stat(PostBreachFilesService.get_custom_pba_directory())
@ -57,7 +57,7 @@ def _get_acl_and_sid_from_path(path: str):
return acl, sid 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(): def test_custom_pba_dir_permissions_windows():
pba_dir = PostBreachFilesService.get_custom_pba_directory() pba_dir = PostBreachFilesService.get_custom_pba_directory()