Exemplo n.º 1
0
 def test_image_to_pdf(self):
     blob = self.read_file("picture.jpg")
     pdf = converter.to_pdf("", blob, "image/jpeg")
     assert "application/pdf" == mime_sniffer.from_buffer(pdf)
Exemplo n.º 2
0
 def XXXtest_word_to_pdf(self):
     blob = self.read_file("test.doc")
     pdf = converter.to_pdf("", blob, "application/msword")
     assert b"application/pdf" == mime_sniffer.from_buffer(pdf)
Exemplo n.º 3
0
 def XXXtest_odt_to_pdf(self):
     blob = self.read_file("test.odt")
     pdf = converter.to_pdf("", blob,
                            "application/vnd.oasis.opendocument.text")
     assert b"application/pdf" == mime_sniffer.from_buffer(pdf)
Exemplo n.º 4
0
 def test_image_to_pdf(self):
   blob = self.read_file("picture.jpg")
   pdf = converter.to_pdf("", blob, "image/jpeg")
   assert "application/pdf" == mime_sniffer.from_buffer(pdf)
Exemplo n.º 5
0
 def XXXtest_word_to_pdf(self):
   blob = self.read_file("test.doc")
   pdf = converter.to_pdf("", blob, "application/msword")
   assert "application/pdf" == mime_sniffer.from_buffer(pdf)
Exemplo n.º 6
0
 def XXXtest_odt_to_pdf(self):
   blob = self.read_file("test.odt")
   pdf = converter.to_pdf("", blob, "application/vnd.oasis.opendocument.text")
   assert "application/pdf" == mime_sniffer.from_buffer(pdf)