(self, mkdir: MagicMock, mkstemp: MagicMock, mock_open_object)
| 20 | @patch("tempfile.mkstemp") |
| 21 | @patch("pathlib.Path.mkdir") |
| 22 | def createMapping(self, mkdir: MagicMock, mkstemp: MagicMock, mock_open_object): |
| 23 | mkstemp.return_value = (1, str(self.outDir / "tmp" / "tmp_test")) |
| 24 | mapping = FileMapping.generate("/test", self.outDir, Path("filesystems"), self.log) |
| 25 | mapping._getShaHash = Mock(return_value = self.hash) |
| 26 | mapping.file.closed = False |
| 27 | return mapping, mkdir, mkstemp, mock_open_object |
| 28 | |
| 29 | def test_generate_createsTempFile(self): |
| 30 | mapping, mkdir, mkstemp, mock_open_object = self.createMapping() |
no test coverage detected