예제 #1
0
 def test_should_call_check_output_with_rtf(
         self, temp_dir: Path, pdf_path: Path, doc_converter_mock: MagicMock):
     pdf_path.write_bytes(PDF_CONTENT_1)
     _convert_doc_to(DOC_CONTENT_1, MimeTypes.RTF, 'pdf')
     doc_converter_mock.convert.assert_called_with(
         str(temp_dir.joinpath('temp.rtf')),
         output_type='pdf'
     )
예제 #2
0
 def test_should_return_pdf(self, pdf_path: Path):
     pdf_path.write_bytes(PDF_CONTENT_1)
     assert _convert_doc_to(
         DOC_CONTENT_1, MimeTypes.DOC, 'pdf'
     ) == PDF_CONTENT_1