MCPcopy Index your code
hub / github.com/GoSecure/pyrdp / test_finalize_movesFileToOutDir

Method test_finalize_movesFileToOutDir

test/test_FileMapping.py:68–75  ·  view source on GitHub ↗
(self, *_)

Source from the content-addressed store, hash-verified

66 @patch("pathlib.Path.symlink_to")
67 @patch("pathlib.Path.mkdir")
68 def test_finalize_movesFileToOutDir(self, *_):
69 mapping, *_ = self.createMapping()
70 mapping.write(b"data")
71
72 with patch("pathlib.Path.rename") as mock_rename:
73 mapping.finalize()
74 mock_rename.assert_called_once()
75 self.assertEqual(mock_rename.call_args[0][0].parents[0], self.outDir)
76
77 @patch("pathlib.Path.rename")
78 @patch("pathlib.Path.unlink")

Callers

nothing calls this directly

Calls 3

createMappingMethod · 0.95
writeMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected