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

Continue with level report processing. A proper pdf stream is now created.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py

    r10553 r10557  
    55from waeup.kofa.interfaces import IJobManager
    66from waeup.kofa.students.reports.level_report import (
    7     get_students_by)
     7    get_students_by, LevelReport)
    88from waeup.kofa.students.tests.test_catalog import CatalogTestSetup
    99from waeup.kofa.students.tests.test_browser import StudentsFullSetup
    1010from waeup.kofa.testing import FunctionalLayer
    1111from waeup.kofa.tests.test_async import FunctionalAsyncTestCase
     12from waeup.kofa.browser.tests.test_pdf import samples_dir
    1213
    1314class LevelReportTests(CatalogTestSetup):
     
    2122            [(u'K1000000', u'1234', u'Bob Tester', 30, 30, 5.0, [])])
    2223        return
     24
     25    def test_create_pdf(self):
     26        report = LevelReport('fac1', 'dep1', 2010, 100)
     27        result = report.create_pdf()
     28        self.assertTrue(result.startswith('%PDF-'))
     29        path = os.path.join(samples_dir(), 'level_report.pdf')
     30        open(path, 'wb').write(result)
     31        print "Sample level_report.pdf written to %s" % path
     32        return
Note: See TracChangeset for help on using the changeset viewer.