Ignore:
Timestamp:
15 Nov 2018, 07:43:48 (6 years ago)
Author:
Henrik Bettermann
Message:

Fix get_student_payment_stats. Department codes are not unique. Use its path instead.

File:
1 edited

Legend:

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

    r14513 r15243  
    5353        return
    5454
    55     def test_create_pdf(self):
     55    def test_create_pdf_1(self):
    5656        report = StudentPaymentStatisticsReport(
    5757            2010, 'Undergraduate Full-Time', 0, 0, 0, 'faccode')
    5858        result = report.create_pdf('JOB_ID')
    5959        self.assertTrue(result.startswith('%PDF-'))
    60         path = os.path.join(samples_dir(), 'student_payment_statistics.pdf')
     60        path = os.path.join(samples_dir(), 'student_payment_statistics_faccode.pdf')
    6161        open(path, 'wb').write(result)
    62         print "Sample PDF student_statistics.pdf written to %s" % path
     62        print "Sample PDF student_statistics_faccode.pdf written to %s" % path
     63        return
     64
     65    def test_create_pdf_2(self):
     66        report = StudentPaymentStatisticsReport(
     67            2010, 'Undergraduate Full-Time', 0, 0, 0, 'depcode')
     68        result = report.create_pdf('JOB_ID')
     69        self.assertTrue(result.startswith('%PDF-'))
     70        path = os.path.join(samples_dir(), 'student_payment_statistics_depcode.pdf')
     71        open(path, 'wb').write(result)
     72        print "Sample PDF student_statistics_depcode.pdf written to %s" % path
    6373        return
    6474
Note: See TracChangeset for help on using the changeset viewer.