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

Method test_generate_createsTempFile

test/test_FileMapping.py:29–38  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 return mapping, mkdir, mkstemp, mock_open_object
28
29 def test_generate_createsTempFile(self):
30 mapping, mkdir, mkstemp, mock_open_object = self.createMapping()
31 mkstemp.return_value = (1, str(self.outDir / "tmp" / "tmp_test"))
32
33 mkdir.assert_called_once_with(exist_ok = True)
34 mkstemp.assert_called_once()
35 mock_open_object.assert_called_once()
36
37 tmpDir = mkstemp.call_args[0][-1]
38 self.assertEqual(tmpDir, self.outDir / "tmp")
39
40 def test_write_setsWritten(self):
41 mapping, *_ = self.createMapping()

Callers

nothing calls this directly

Calls 1

createMappingMethod · 0.95

Tested by

no test coverage detected