- Timestamp:
- 27 Aug 2026, 10:48:28 (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/reports/tests/test_level_report.py
r18307 r18309 4 4 from zope.component import getUtility 5 5 from waeup.kofa.interfaces import IJobManager 6 from waeup.kofa.students.reports.level_report import ILevelReport 6 from waeup.kofa.students.reports.level_report import ILevelReport, LevelReport 7 7 from waeup.kofa.students.tests.test_catalog import CatalogTestSetup 8 8 from waeup.kofa.students.tests.test_browser import StudentsFullSetup … … 17 17 18 18 19 class GradLevelReportTests(CatalogTestSetup):19 class LevelReportTests(CatalogTestSetup): 20 20 21 21 layer = FunctionalLayer … … 45 45 return 46 46 47 def test_create_pdf (self):47 def test_create_pdf_grad(self): 48 48 self.student['studycourse']['100']['Course1'].ca = 0 49 self.student['studycourse']['100']['Course1'].credits = 9149 self.student['studycourse']['100']['Course1'].credits = 146 50 50 self.certificate.end_level = 100 51 self.certificate.custom_float_1 = 7751 self.certificate.custom_float_1 = 145.6 52 52 self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine - Dean of Faculty' 53 53 self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine - Head of Department' … … 58 58 open(path, 'wb').write(result) 59 59 print "Sample grad_level_report.pdf written to %s" % path 60 return 61 62 def test_create_pdf(self): 63 self.student['studycourse']['100']['Course1'].ca = 0 64 self.student['studycourse']['100']['Course1'].credits = 91 65 self.certificate.end_level = 100 66 self.certificate.custom_float_1 = 77 67 self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine - Dean of Faculty' 68 self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine - Head of Department' 69 report = LevelReport('fac1', 'dep1', 'CERT1', 2010, 100) 70 result = report.create_pdf('JOB_ID') 71 self.assertTrue(result.startswith('%PDF-')) 72 path = os.path.join(samples_dir(), 'level_report.pdf') 73 open(path, 'wb').write(result) 74 print "Sample level_report.pdf written to %s" % path 60 75 return 61 76
Note: See TracChangeset for help on using the changeset viewer.
