def test_concat(self): first_html = "<h1>Hola Mundo</h1>" second_html = "<h2>This is sparta</h2>" pdf = Pdf(first_html) output = pdf.concat(pdf.get_stream(), second_html) fh = open('tests/fixtures/concat.pdf', 'rb') data = fh.read() fh.close() self.assertPdfEquals(output, data)
def test_concat(self): first_html = "<h1>Hola Mundo</h1>" second_html = "<h2>This is sparta</h2>" pdf = Pdf(first_html) output = pdf.concat(pdf.get_stream(), second_html) fh = open('tests/fixtures/concat.pdf', 'rb') data = fh.read() fh.close() self.assertPdfEquals(output, data);