Ignore:
Timestamp:
8 Feb 2017, 07:38:30 (8 years ago)
Author:
Henrik Bettermann
Message:

Add entry_session and p_session filter to Student Payment Statistics generator.

File:
1 edited

Legend:

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

    r14373 r14513  
    2222        # ensure we fullfill interface contracts
    2323        obj = StudentPaymentStatisticsReport(
    24             2010, 'Undergraduate Full-Time', 0, 'faccode')
     24            2010, 'Undergraduate Full-Time', 0, 0, 0, 'faccode')
    2525        verifyClass(IStudentPaymentStatisticsReport, StudentPaymentStatisticsReport)
    2626        verifyObject(IStudentPaymentStatisticsReport, obj)
     
    3030        # we can get a table with one student
    3131        result1 = get_student_payment_stats(
    32             2010, 'Undergraduate Full-Time', 0, 'faccode')
     32            2010, 'Undergraduate Full-Time', 0, 0, 0, 'faccode')
    3333        result2 = get_student_payment_stats(
    34             2009, 'Undergraduate Full-Time', 0, 'faccode')
     34            2009, 'Undergraduate Full-Time', 0, 0, 0, 'faccode')
    3535        self.assertEqual(
    3636            result1,
     
    5555    def test_create_pdf(self):
    5656        report = StudentPaymentStatisticsReport(
    57             2010, 'Undergraduate Full-Time', 0, 'faccode')
     57            2010, 'Undergraduate Full-Time', 0, 0, 0, 'faccode')
    5858        result = report.create_pdf('JOB_ID')
    5959        self.assertTrue(result.startswith('%PDF-'))
     
    106106                         'application/pdf')
    107107        self.assertTrue(
    108             'filename="StudentPaymentStatisticsReport_2004_2005_All__' in
     108            'filename="StudentPaymentStatisticsReport_rno%s' % job_id in
    109109            self.browser.headers['content-disposition'])
    110110        self.assertEqual(len(self.app['reports'].running_report_jobs), 1)
    111         job_id = self.app['reports'].running_report_jobs[0][0]
    112111        # ... and discarded
    113112        self.browser.open('http://localhost/app/reports')
     
    120119        self.assertTrue(
    121120            'INFO - zope.mgr - students.reports.student_payment_statistics.StudentPaymentStatisticsReportGeneratorPage - '
    122             'report %s created: Student Payment Statistics (session=2004, mode=All, level=0, breakdown=depcode)'
     121            'report %s created: Student Payment Statistics '
     122            '(session=2004, mode=All, level=0, entry_session=0, '
     123            'p_session=0, breakdown=depcode)'
    123124            % job_id in logcontent
    124125            )
    125126        self.assertTrue(
    126127            'INFO - zope.mgr - students.reports.student_payment_statistics.StudentPaymentStatisticsReportPDFView - '
    127             'report %s downloaded: StudentPaymentStatisticsReport_2004_2005_All__'
    128             % job_id in logcontent
     128            'report %s downloaded: StudentPaymentStatisticsReport_rno%s_'
     129            % (job_id, job_id) in logcontent
    129130            )
    130131        self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.