diff --git a/tests/filemanager/test_filemanager.py b/tests/filemanager/test_filemanager.py index 5bb985f3b..abf550ee6 100644 --- a/tests/filemanager/test_filemanager.py +++ b/tests/filemanager/test_filemanager.py @@ -398,7 +398,8 @@ class FileManagerTest(unittest.TestCase): @mock.patch("shutil.copyfileobj") @mock.patch("os.remove") @mock.patch("tempfile.NamedTemporaryFile") - def test_slice(self, mocked_tempfile, mocked_os, mocked_shutil, mocked_fileio, mocked_atomic_write): + @mock.patch("os.chmod") + def test_slice(self, mocked_chmod, mocked_tempfile, mocked_os, mocked_shutil, mocked_fileio, mocked_atomic_write): callback = mock.MagicMock() callback_args = ("one", "two", "three") diff --git a/tests/util/test_file_helpers.py b/tests/util/test_file_helpers.py index 80c009434..196db58fb 100644 --- a/tests/util/test_file_helpers.py +++ b/tests/util/test_file_helpers.py @@ -126,7 +126,7 @@ class TestAtomicWrite(unittest.TestCase): mock_open.assert_called_once_with(path, mode="w+b") mock_file.write.assert_called_once_with("test") mock_file.close.assert_called_once_with() - mock_chmod.assert_called_once_with(path, 0o644) + mock_chmod.assert_called_once_with(path, 0o664) mock_move.assert_called_once_with(path, "somefile.yaml") @mock.patch("shutil.move") @@ -231,7 +231,7 @@ class TestAtomicWrite(unittest.TestCase): mock_close.assert_called_once_with(fd) mock_open.assert_called_once_with(path, mode="w", encoding="utf-8") mock_file.close.assert_called_once_with() - mock_chmod.assert_called_once_with(path, 0o644) + mock_chmod.assert_called_once_with(path, 0o664) mock_move.assert_called_once_with(path, "somefile.yaml")