Ignore:
Timestamp:
7 Feb 2013, 08:21:05 (12 years ago)
Author:
Henrik Bettermann
Message:

Implement combo card data exporter.

File:
1 edited

Legend:

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

    r9861 r9936  
    1010    CourseTicketExporter, StudentPaymentsExporter, BedTicketsExporter,
    1111    StudentPaymentsOverviewExporter, StudentStudyLevelsOverviewExporter,
     12    ComboCardDataExporter,
    1213    get_students,)
    1314from waeup.kofa.students.accommodation import BedTicket
     
    930931            )
    931932        return
     933
     934class ComboCardExporterTest(StudentImportExportSetup):
     935
     936    layer = FunctionalLayer
     937
     938    def setUp(self):
     939        super(ComboCardExporterTest, self).setUp()
     940        self.setup_for_export()
     941        return
     942
     943    def test_export_all(self):
     944        self.setup_student(self.student)
     945        exporter = ComboCardDataExporter()
     946        exporter.export_all(self.app, self.outfile)
     947        result = open(self.outfile, 'rb').read()
     948        self.assertTrue(
     949            'display_fullname,matric_number,certificate,faculty,department\r\n'
     950            'Anna M. Tester,234,Unnamed Certificate,Faculty of Unnamed '
     951            'Faculty (NA),Department of Unnamed Department (NA)'
     952            in result
     953            )
     954        return
Note: See TracChangeset for help on using the changeset viewer.