Ignore:
Timestamp:
9 Dec 2014, 11:04:53 (10 years ago)
Author:
Henrik Bettermann
Message:

Add PDFMergeDocumentSlipPage which merges the pdf slip with pdf files connected to the document.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12169 r12182  
    10911091        open(path, 'wb').write(self.browser.contents)
    10921092        print "Sample document_slip.pdf written to %s" % path
     1093        # Officers can open merged pdf document slips
     1094        pdfdocument = createObject('waeup.CustomerPDFDocument')
     1095        pdfdocument.title = u'My first document'
     1096        self.customer['documents'].addDocument(pdfdocument)
     1097        # Add pdf file
     1098        file_id = IFileStoreNameChooser(pdfdocument).chooseName(attr='sample.pdf')
     1099        fs = ExtFileStore(root=self.dc_root)
     1100        pdffile = open(SAMPLE_PDF, 'rb')
     1101        fs.createFile(file_id, pdffile)
     1102        self.browser.open(self.customer_path + '/documents/d102')
     1103        self.browser.getLink("Download document slip").click()
     1104        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     1105        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     1106        path = os.path.join(samples_dir(), 'pdfdocument_slip.pdf')
     1107        open(path, 'wb').write(self.browser.contents)
     1108        print "Sample pdfdocument_slip.pdf written to %s" % path
    10931109
    10941110
Note: See TracChangeset for help on using the changeset viewer.