Ignore:
Timestamp:
27 May 2013, 07:14:13 (12 years ago)
Author:
Henrik Bettermann
Message:

Add exporter fur bursary data.

File:
1 edited

Legend:

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

    r10232 r10233  
    1313    CourseTicketExporter, StudentPaymentsExporter, BedTicketsExporter,
    1414    StudentPaymentsOverviewExporter, StudentStudyLevelsOverviewExporter,
    15     ComboCardDataExporter,
     15    ComboCardDataExporter, DataForBursaryExporter,
    1616    get_students,)
    1717from waeup.kofa.students.accommodation import BedTicket
     
    717717        return
    718718
     719class BursaryDataExporterTest(StudentImportExportSetup):
     720
     721    layer = FunctionalLayer
     722
     723    def setUp(self):
     724        super(BursaryDataExporterTest, self).setUp()
     725        self.setup_for_export()
     726        return
     727
     728    def test_export_all(self):
     729        # we can really export all payments
     730        # set values we can expect in export file
     731        self.setup_student(self.student)
     732        exporter = DataForBursaryExporter()
     733        exporter.export_all(self.app, self.outfile)
     734        result = open(self.outfile, 'rb').read()
     735        self.assertEqual(
     736            result,
     737            'ac,amount_auth,creation_date,p_category,p_current,p_id,p_item,'
     738            'p_level,p_session,p_state,payment_date,r_amount_approved,'
     739            'r_code,r_desc,student_id,matric_number,state,current_session,'
     740            'faccode,depcode,display_fullname\r\n'
     741
     742            '666,0.0,2012-04-01 13:12:01,schoolfee,1,my-id,p-item,100,2012,'
     743            'unpaid,2012-04-01 14:12:01,12.12,r-code,,A111111,'
     744            '234,created,2012,NA,NA,Anna M. Tester\r\n'
     745            )
     746        return
     747
    719748class BedTicketsExporterTest(StudentImportExportSetup):
    720749
Note: See TracChangeset for help on using the changeset viewer.