Ignore:
Timestamp:
6 Jan 2016, 08:21:17 (9 years ago)
Author:
Henrik Bettermann
Message:

Add matric_number to export file.

File:
1 edited

Legend:

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

    r13351 r13569  
    88from waeup.aaue.students.export import (
    99    CustomStudentExporter, CustomStudentPaymentExporter,
    10     CustomStudentStudyLevelExporter)
     10    CustomStudentStudyLevelExporter,
     11    CustomCourseTicketExporter)
    1112from waeup.aaue.testing import FunctionalLayer
    1213
     
    141142        return
    142143
     144class CustomCourseTicketExporterTest(StudentImportExportSetup):
     145
     146    layer = FunctionalLayer
     147
     148    def setUp(self):
     149        super(CustomCourseTicketExporterTest, self).setUp()
     150        self.setup_for_export()
     151        return
     152
     153    def test_export_all(self):
     154        # we can really export all course tickets
     155        # set values we can expect in export file
     156        self.setup_student(self.student)
     157        exporter = CustomCourseTicketExporter()
     158        exporter.export_all(self.app, self.outfile)
     159        result = open(self.outfile, 'rb').read()
     160        self.assertEqual(
     161            result,
     162            'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
     163            'mandatory,passmark,score,semester,title,student_id,certcode,'
     164            'display_fullname,matric_number\r\n'
     165            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,'
     166            'Anna M. Tester,234\r\n'
     167            )
     168        return
     169
Note: See TracChangeset for help on using the changeset viewer.