- Timestamp:
- 24 Aug 2016, 10:14:06 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py
r14079 r14124 2 2 from zc.async.testing import wait_for_result 3 3 from zope.interface.verify import verifyClass, verifyObject 4 from zope.component import getUtility 4 from zope.component import getUtility, createObject 5 5 from waeup.kofa.interfaces import IJobManager 6 6 from waeup.kofa.students.reports.level_report import ( … … 24 24 25 25 def test_get_students(self): 26 ticket = createObject('waeup.CourseTicket') 27 ticket.code = 'Course2' 28 ticket.credits = 30 29 ticket.score = 30 30 ticket.mandatory = True 31 ticket.passmark = 40 32 self.student['studycourse']['100']['Course2'] = ticket 33 ticket = createObject('waeup.CourseTicket') 34 ticket.code = 'Course3' 35 ticket.credits = 30 36 ticket.score = 30 37 ticket.mandatory = False 38 ticket.passmark = 40 39 self.student['studycourse']['100']['Course3'] = ticket 26 40 # we can get a table with one student 27 41 result = get_students('fac1', 'dep1', 2010, 100) 28 42 self.assertEqual(result, 29 [(u'1234', u'Bob Tester', 30, 30, 5.0, '', 30, 30, 5.0, None)]) 43 [(u'1234', u'Bob Tester', 90, 30, 1.667, 'm_Course2_m Course3', 44 90, 30, 1.667, None)]) 30 45 return 31 46 32 47 def test_create_pdf(self): 48 ticket = createObject('waeup.CourseTicket') 49 ticket.code = 'Course2' 50 ticket.credits = 30 51 ticket.score = 30 52 ticket.mandatory = True 53 ticket.passmark = 40 54 self.student['studycourse']['100']['Course2'] = ticket 55 ticket = createObject('waeup.CourseTicket') 56 ticket.code = 'Course3' 57 ticket.credits = 30 58 ticket.score = 30 59 ticket.mandatory = False 60 ticket.passmark = 40 61 self.student['studycourse']['100']['Course3'] = ticket 33 62 report = LevelReport('fac1', 'dep1', 2010, 100) 34 63 result = report.create_pdf()
Note: See TracChangeset for help on using the changeset viewer.