💚 Fix tests broken by 894178918

This commit is contained in:
Gina Häußge committed 2020-08-03 09:59:56 +02:00
1 parent 894178918b
commit e7e04271fd
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -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")
+2 -2
View File
@@ -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")