From 6d360ef8654d2e719478c23cb9f89c5269c16c54 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 14 Jun 2021 17:51:55 +0530 Subject: [PATCH] tests: Fix assertion in `test_create_secure_directory__perm_linux()` --- .../tests/unit_tests/monkey_island/cc/environment/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/environment/test_utils.py b/monkey/tests/unit_tests/monkey_island/cc/environment/test_utils.py index b04b180e5..b18f5d656 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/environment/test_utils.py +++ b/monkey/tests/unit_tests/monkey_island/cc/environment/test_utils.py @@ -39,7 +39,7 @@ def test_create_secure_directory__no_parent_dir(test_path_nested): def test_create_secure_directory__perm_linux(test_path): create_secure_directory(test_path) st = os.stat(test_path) - return bool(st.st_mode & stat.S_IRWXU) + assert (st.st_mode & 0o777) == stat.S_IRWXU @pytest.mark.skipif(not is_windows_os(), reason="Tests Windows (not Posix) permissions.")