Ignore:
Timestamp:
10 Feb 2017, 17:03:20 (8 years ago)
Author:
Henrik Bettermann
Message:

If ticket.score is set to '-1', total_score will be 0 and the grade is '-'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py

    r14528 r14532  
    3737        # we can get a list with one course code
    3838        result = get_courses('fac1', 'dep1', 'CERT1', 2010, 100)
    39         self.assertEqual(result, [(u'Course1')])
     39        self.assertEqual(result, [u'Course1'])
    4040        return
    4141
     
    5454
    5555    def test_create_pdf(self):
    56         self.course = createObject('waeup.Course')
    57         self.course.code = 'Course2'
    58         self.course.credits = 30
     56        self.course2 = createObject('waeup.Course')
     57        self.course2.code = 'Course2'
     58        self.course2.credits = 30
    5959        self.app['faculties']['fac1']['dep1'].courses.addCourse(
    60             self.course)
     60            self.course2)
    6161        self.app['faculties']['fac1']['dep1'].certificates[
    62             'CERT1'].addCertCourse(self.course, level=100)
     62            'CERT1'].addCertCourse(self.course2, level=100)
     63        self.course3 = createObject('waeup.Course')
     64        self.course3.code = 'Course3'
     65        self.course3.credits = 30
     66        self.app['faculties']['fac1']['dep1'].courses.addCourse(
     67            self.course3)
     68        self.app['faculties']['fac1']['dep1'].certificates[
     69            'CERT1'].addCertCourse(self.course3, level=100)
    6370        self.app['faculties']['fac1'].officer_1 = 'Rosa Moonshine - Dean of Faculty'
    6471        self.app['faculties']['fac1']['dep1'].officer_1 = 'Amalia Sunshine - Head of Department'
     
    7380        ticket.ca = 10
    7481        self.student['studycourse']['200']['Course2'] = ticket
     82        ticket = createObject('waeup.CourseTicket')
     83        ticket.code = 'Course3'
     84        ticket.credits = 30
     85        # core course, no result available
     86        ticket.score = -1
     87        ticket.ca = 0
     88        self.student['studycourse']['200']['Course3'] = ticket
     89        self.assertEqual(ticket.grade, '-')
    7590        self.student.firstname = u'Osahenokese Tessy'
    7691        self.student.lastname = u'Emwinyomwanru'
Note: See TracChangeset for help on using the changeset viewer.