Ignore:
Timestamp:
13 Mar 2017, 11:52:24 (8 years ago)
Author:
Henrik Bettermann
Message:

Extend CustomStudentStudyCourseExporter?.

File:
1 edited

Legend:

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

    r14595 r14622  
    1111    CustomStudentStudyLevelExporter,
    1212    CustomCourseTicketExporter,
    13     LevelReportDataExporter)
     13    LevelReportDataExporter,
     14    CustomStudentStudyCourseExporter)
    1415from waeup.aaue.testing import FunctionalLayer
    1516
     
    122123        return
    123124
     125class CustomStudentStudyCourseExporterTest(StudentImportExportSetup):
     126
     127    layer = FunctionalLayer
     128
     129    def setUp(self):
     130        super(CustomStudentStudyCourseExporterTest, self).setUp()
     131        self.setup_for_export()
     132        return
     133
     134    def test_export_all(self):
     135        self.setup_student(self.student)
     136        exporter = CustomStudentStudyCourseExporter()
     137        exporter.export_all(self.app, self.outfile)
     138        result = open(self.outfile, 'rb').read()
     139        self.assertEqual(
     140            result,
     141            'certificate,current_level,current_session,current_verdict,'
     142            'entry_mode,entry_session,imported_cgpa,previous_verdict,'
     143            'matric_number,state,student_id\r\n'
     144            'CERT1,200,2012,0,ug_ft,2010,,0,234,created,A111111\r\n'
     145            )
     146        return
     147
     148
    124149class CustomStudentStudyLevelExporterTest(StudentImportExportSetup):
    125150
Note: See TracChangeset for help on using the changeset viewer.