Ignore:
Timestamp:
21 Jan 2017, 16:07:07 (8 years ago)
Author:
Henrik Bettermann
Message:

Confine Level Reports and Session Results Presentations to certificates.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests
Files:
3 edited

Legend:

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

    r14419 r14425  
    2020    def test_iface(self):
    2121        # ensure we fullfill interface contracts
    22         obj = CustomLevelReport('fac1', 'dep1', 2010, 100)
     22        obj = CustomLevelReport('fac1', 'dep1', 'CERT1', 2010, 100)
    2323        verifyClass(ILevelReport, CustomLevelReport)
    2424        verifyObject(ILevelReport, obj)
     
    2828        # we can get a table with one student
    2929        self.student['studycourse']['100']['Course1'].ca = 0
    30         result = get_students('fac1', 'dep1', 2010, 100)
     30        result = get_students('fac1', 'dep1', 'CERT1', 2010, 100)
    3131        self.assertEqual(result,
    3232            [(u'1234', u'TESTER, Bob', 30, 30, '5.000', 'NIL', '', 30, 30, '5.000', 'Proceed')])
     
    3535    def test_create_pdf(self):
    3636        self.student['studycourse']['100']['Course1'].ca = 0
    37         report = CustomLevelReport('fac1', 'dep1', 2010, 100)
     37        report = CustomLevelReport('fac1', 'dep1', 'CERT1', 2010, 100)
    3838        result = report.create_pdf('JOB_ID')
    3939        self.assertTrue(result.startswith('%PDF-'))
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py

    r14399 r14425  
    1111from waeup.aaue.students.reports.raw_score_report import (
    1212    get_students, RawScoreReport, IRawScoreReport,
    13     get_courses_1 as get_courses)
     13    get_courses)
    1414from waeup.aaue.testing import FunctionalLayer
    1515
     
    2929    def test_iface(self):
    3030        # ensure we fullfill interface contracts
    31         obj = RawScoreReport('fac1', 'dep1', 2010, 100)
     31        obj = RawScoreReport('fac1', 'dep1', 'CERT1', 2010, 100)
    3232        verifyClass(IRawScoreReport, RawScoreReport)
    3333        verifyObject(IRawScoreReport, obj)
     
    3636    def test_get_courses(self):
    3737        # we can get a list with one course code
    38         result = get_courses('fac1', 'dep1', 2010, 100)
     38        result = get_courses('fac1', 'dep1', 'CERT1', 2010, 100)
    3939        self.assertEqual(result, [(u'Course1')])
    4040        return
     
    4343        # we can get a table with one student
    4444        self.student['studycourse']['100']['Course1'].ca = 0
    45         course_codes = get_courses('fac1', 'dep1', 2010, 100)
    46         result = get_students('fac1', 'dep1', 2010, 100, course_codes)
     45        course_codes = get_courses('fac1', 'dep1', 'CERT1', 2010, 100)
     46        result = get_students('fac1', 'dep1', 'CERT1', 2010, 100, course_codes)
    4747        self.assertEqual(result,
    4848            [(u'1234', u'TESTER, Bob', {'Course1': (70, 'A')})])
     
    6868        self.student.firstname = u'Osahenokese Tessy'
    6969        self.student.lastname = u'Emwinyomwanru'
    70         report = RawScoreReport('fac1', 'dep1', 2011, 200)
     70        report = RawScoreReport('fac1', 'dep1', 'CERT1', 2011, 200)
    7171        result = report.create_pdf('JOB_ID')
    7272        self.assertTrue(result.startswith('%PDF-'))
  • main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_session_results_presentation.py

    r14393 r14425  
    2323    def test_iface(self):
    2424        # ensure we fullfill interface contracts
    25         obj = CustomSessionResultsPresentation('fac1', 'dep1', 2010, 100)
     25        obj = CustomSessionResultsPresentation('fac1', 'dep1', 'CERT1', 2010, 100)
    2626        verifyClass(ISessionResultsPresentation, CustomSessionResultsPresentation)
    2727        verifyObject(ISessionResultsPresentation, obj)
     
    2929
    3030    def test_get_students(self):
    31         result = get_students('fac1', 'dep1', 2010, 100)
     31        result = get_students('fac1', 'dep1', 'CERT1', 2010, 100)
    3232        self.assertEqual(result,
    3333            [[(u'E1000000', u'1234', u'TESTER, Bob')], [], [], [], [], [], []])
    3434        self.student['studycourse']['100']['Course1'].score = 60
    3535        self.student['studycourse']['100']['Course1'].ca = 10
    36         result = get_students('fac1', 'dep1', 2010, 100)
     36        result = get_students('fac1', 'dep1', 'CERT1', 2010, 100)
    3737        self.assertEqual(result,
    3838            [[], [], [], [], [], [(u'E1000000', u'1234', u'TESTER, Bob')], []])
     
    4141
    4242    def test_create_pdf(self):
    43         report = CustomSessionResultsPresentation('fac1', 'dep1', 2010, 100)
     43        report = CustomSessionResultsPresentation('fac1', 'dep1', 'CERT1', 2010, 100)
    4444        result = report.create_pdf('JOB_ID')
    4545        self.assertTrue(result.startswith('%PDF-'))
Note: See TracChangeset for help on using the changeset viewer.