Ignore:
Timestamp:
29 Aug 2013, 09:51:15 (11 years ago)
Author:
Henrik Bettermann
Message:

A sample report pdf file is quite useful.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_pdf.py

    r10259 r10556  
    316316    return tmp_dir
    317317
    318 def draw_sample_pdf(data, name='sample1.pdf',
     318def draw_sample_pdf(data, name='signatures.pdf',
    319319                    title='Sample Title', author='Test Author'):
    320320    # create a pdf document with data as content
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py

    r10551 r10556  
    1111from waeup.kofa.testing import FunctionalLayer
    1212from waeup.kofa.tests.test_async import FunctionalAsyncTestCase
     13from waeup.kofa.browser.tests.test_pdf import samples_dir
    1314
    1415class StudentStatisticsReportTests(CatalogTestSetup):
     
    7273        result = report.create_pdf()
    7374        self.assertTrue(result.startswith('%PDF-'))
     75        path = os.path.join(samples_dir(), 'student_statistics.pdf')
     76        open(path, 'wb').write(result)
     77        print "Sample PDF student_statistics.pdf written to %s" % path
    7478        return
    7579
Note: See TracChangeset for help on using the changeset viewer.