Ignore:
Timestamp:
27 Feb 2017, 06:11:10 (8 years ago)
Author:
Henrik Bettermann
Message:

Add LevelReportDataExporter?.

File:
1 edited

Legend:

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

    r14576 r14593  
    1010    CustomStudentExporter, CustomStudentPaymentExporter,
    1111    CustomStudentStudyLevelExporter,
    12     CustomCourseTicketExporter)
     12    CustomCourseTicketExporter,
     13    LevelReportDataExporter)
    1314from waeup.aaue.testing import FunctionalLayer
    1415
     
    174175        return
    175176
     177class LevelReportDataExporterTest(StudentImportExportSetup):
     178
     179    layer = FunctionalLayer
     180
     181    def setUp(self):
     182        super(LevelReportDataExporterTest, self).setUp()
     183        self.setup_for_export()
     184        return
     185
     186    def test_export_all(self):
     187        # we can really export study levels
     188        # set values we can expect in export file
     189        self.setup_student(self.student)
     190        exporter = LevelReportDataExporter()
     191        exporter.export_all(self.app, self.outfile)
     192        result = open(self.outfile, 'rb').read()
     193        self.assertEqual(
     194            result,
     195            'matric_number,display_fullname,credits_counted,credits_passed,'
     196            'level_gpa,failed_courses,not_taken_courses,cum_credits_taken,'
     197            'cum_credits_passed,cgpa,remark\r\n'
     198            '234,"TESTER, Anna M.",0,0,0.000,,CRS1 ,0,0,0.000,\r\n'
     199            )
     200        return
     201
     202
Note: See TracChangeset for help on using the changeset viewer.