Ignore:
Timestamp:
24 Aug 2016, 10:14:06 (8 years ago)
Author:
Henrik Bettermann
Message:

Underline mandatory (core) courses.

If one mandatory course has been failed, the final remark is 'FRNS'.

File:
1 edited

Legend:

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

    r14079 r14124  
    22from zc.async.testing import wait_for_result
    33from zope.interface.verify import verifyClass, verifyObject
    4 from zope.component import getUtility
     4from zope.component import getUtility, createObject
    55from waeup.kofa.interfaces import IJobManager
    66from waeup.kofa.students.reports.level_report import (
     
    2424
    2525    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
    2640        # we can get a table with one student
    2741        result = get_students('fac1', 'dep1', 2010, 100)
    2842        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)])
    3045        return
    3146
    3247    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
    3362        report = LevelReport('fac1', 'dep1', 2010, 100)
    3463        result = report.create_pdf()
Note: See TracChangeset for help on using the changeset viewer.