def test_form_fields_count(self): folder = Folder() response = folder.upload_file('./data/test_file_on_storage.pdf') self.assertEqual(True, response) doc = Document('test_file_on_storage.pdf') response = doc.get_form_fields_count() self.assertEqual(int, type(response))
def test_split_pdf(self): folder = Folder() response = folder.upload_file('./data/test_file_on_storage.pdf') self.assertEqual(True, response) doc = Document('test_file_on_storage.pdf') response = doc.split_pdf() self.assertEqual(dict, type(response))
def test_add_new_page(self): folder = Folder() response = folder.upload_file('./data/test_file_on_storage.pdf') self.assertEqual(True, response) doc = Document('test_file_on_storage.pdf') page_count = doc.get_page_count() response = doc.add_new_page(False, 'test_file_on_storage_new_page.pdf') self.assertEqual(True, os.path.exists(response)) page_count_after_new = doc.get_page_count() self.assertGreater(page_count_after_new, page_count)
def test_add_new_page(self): folder = Folder() response = folder.upload_file('./data/test_file_on_storage.pdf') self.assertEqual(True, response) doc = Document('test_file_on_storage.pdf') page_count = doc.get_page_count() response = doc.add_new_page(False,'test_file_on_storage_new_page.pdf') self.assertEqual(True,os.path.exists(response)) page_count_after_new = doc.get_page_count() self.assertGreater(page_count_after_new,page_count)
def test_create_pdf(self): folder = Folder() response = folder.upload_file('./data/create_pdf_test.svg') response = folder.upload_file('./data/create_pdf_test.jpg') # Create object of pdf document class document = Document('create_pdf_svg.pdf') document.create_pdf('create_pdf_test.svg', 'svg') self.assertEqual(True, os.path.exists('./output/create_pdf_svg.pdf')) # Create object of pdf document class documenta = Document('create_pdf_jpeg.pdf') documenta.create_pdf('create_pdf_test.jpg', 'jpeg') self.assertEqual(True, os.path.exists('./output/create_pdf_jpeg.pdf'))
def test_create_pdf(self): folder = Folder() response = folder.upload_file('./data/create_pdf_test.svg') response = folder.upload_file('./data/create_pdf_test.jpg') # Create object of pdf document class document = Document('create_pdf_svg.pdf') document.create_pdf('create_pdf_test.svg','svg') self.assertEqual(True, os.path.exists('./output/create_pdf_svg.pdf')) # Create object of pdf document class documenta = Document('create_pdf_jpeg.pdf') documenta.create_pdf('create_pdf_test.jpg','jpeg') self.assertEqual(True, os.path.exists('./output/create_pdf_jpeg.pdf'))
def test_create_empty_pdf(self): doc = Document('empty_pdf.pdf') response = doc.create_empty_pdf(False, 'empty_pdf.pdf') self.assertEqual(True, os.path.exists('./output/empty_pdf.pdf'))
def test_create_empty_pdf(self): doc = Document('empty_pdf.pdf') response = doc.create_empty_pdf(False,'empty_pdf.pdf') self.assertEqual(True, os.path.exists('./output/empty_pdf.pdf'))