Ignore:
Timestamp:
20 Apr 2015, 06:42:44 (10 years ago)
Author:
Henrik Bettermann
Message:

Rename classes StudentPaymentsExporter? and BedTicketsExporter? to be in accordance with other exporter names.

File:
1 edited

Legend:

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

    r12568 r12865  
    2929from waeup.kofa.students.export import (
    3030    StudentExporter, StudentStudyCourseExporter, StudentStudyLevelExporter,
    31     CourseTicketExporter, StudentPaymentsExporter, BedTicketsExporter,
     31    CourseTicketExporter, StudentPaymentExporter, BedTicketExporter,
    3232    StudentPaymentsOverviewExporter, StudentStudyLevelsOverviewExporter,
    3333    ComboCardDataExporter, DataForBursaryExporter,
     
    712712        return
    713713
    714 class StudentPaymentsExporterTest(StudentImportExportSetup):
     714class StudentPaymentExporterTest(StudentImportExportSetup):
    715715
    716716    layer = FunctionalLayer
    717717
    718718    def setUp(self):
    719         super(StudentPaymentsExporterTest, self).setUp()
     719        super(StudentPaymentExporterTest, self).setUp()
    720720        self.setup_for_export()
    721721        return
     
    723723    def test_ifaces(self):
    724724        # make sure we fullfill interface contracts
    725         obj = StudentPaymentsExporter()
     725        obj = StudentPaymentExporter()
    726726        verifyObject(ICSVStudentExporter, obj)
    727         verifyClass(ICSVStudentExporter, StudentPaymentsExporter)
     727        verifyClass(ICSVStudentExporter, StudentPaymentExporter)
    728728        return
    729729
     
    738738        payment = StudentOnlinePayment()
    739739        payment.creation_date = datetime.datetime(2012, 4, 1, 13, 12, 1)
    740         exporter = StudentPaymentsExporter()
     740        exporter = StudentPaymentExporter()
    741741        exporter.export([payment], self.outfile)
    742742        result = open(self.outfile, 'rb').read()
     
    756756        self.setup_student(self.student)
    757757        payment = self.student['payments']['my-payment']
    758         exporter = StudentPaymentsExporter()
     758        exporter = StudentPaymentExporter()
    759759        exporter.export([payment], self.outfile)
    760760        result = open(self.outfile, 'rb').read()
     
    775775        # set values we can expect in export file
    776776        self.setup_student(self.student)
    777         exporter = StudentPaymentsExporter()
     777        exporter = StudentPaymentExporter()
    778778        exporter.export_all(self.app, self.outfile)
    779779        result = open(self.outfile, 'rb').read()
     
    794794        # set values we can expect in export file
    795795        self.setup_student(self.student)
    796         exporter = StudentPaymentsExporter()
     796        exporter = StudentPaymentExporter()
    797797        exporter.export_student(self.student, self.outfile)
    798798        result = open(self.outfile, 'rb').read()
     
    815815        notify(grok.ObjectModifiedEvent(self.student))
    816816
    817         exporter = StudentPaymentsExporter()
     817        exporter = StudentPaymentExporter()
    818818        exporter.export_filtered(
    819819            self.student, self.outfile, current_level=200)
     
    836836        self.app['students'].addStudent(self.student)
    837837        notify(grok.ObjectModifiedEvent(self.student))
    838         exporter = StudentPaymentsExporter()
     838        exporter = StudentPaymentExporter()
    839839        # A key xxx does not exist
    840840        self.assertRaises(
     
    926926        return
    927927
    928 class BedTicketsExporterTest(StudentImportExportSetup):
     928class BedTicketExporterTest(StudentImportExportSetup):
    929929
    930930    layer = FunctionalLayer
    931931
    932932    def setUp(self):
    933         super(BedTicketsExporterTest, self).setUp()
     933        super(BedTicketExporterTest, self).setUp()
    934934        self.setup_for_export()
    935935        return
     
    937937    def test_ifaces(self):
    938938        # make sure we fullfill interface contracts
    939         obj = BedTicketsExporter()
     939        obj = BedTicketExporter()
    940940        verifyObject(ICSVStudentExporter, obj)
    941         verifyClass(ICSVStudentExporter, BedTicketsExporter)
     941        verifyClass(ICSVStudentExporter, BedTicketExporter)
    942942        return
    943943
     
    953953        bed = self.app['hostels']['hall-1']['hall-1_A_101_A']
    954954        bedticket.bed = bed
    955         exporter = BedTicketsExporter()
     955        exporter = BedTicketExporter()
    956956        exporter.export([bedticket], self.outfile)
    957957        result = open(self.outfile, 'rb').read()
     
    969969        self.setup_student(self.student)
    970970        bedticket = self.student['accommodation']['2004']
    971         exporter = BedTicketsExporter()
     971        exporter = BedTicketExporter()
    972972        exporter.export([bedticket], self.outfile)
    973973        result = open(self.outfile, 'rb').read()
     
    985985        # set values we can expect in export file
    986986        self.setup_student(self.student)
    987         exporter = BedTicketsExporter()
     987        exporter = BedTicketExporter()
    988988        exporter.export_all(self.app, self.outfile)
    989989        result = open(self.outfile, 'rb').read()
     
    10011001        # set values we can expect in export file
    10021002        self.setup_student(self.student)
    1003         exporter = BedTicketsExporter()
     1003        exporter = BedTicketExporter()
    10041004        exporter.export_student(self.student, self.outfile)
    10051005        result = open(self.outfile, 'rb').read()
     
    10191019        notify(grok.ObjectModifiedEvent(self.student))
    10201020
    1021         exporter = BedTicketsExporter()
     1021        exporter = BedTicketExporter()
    10221022        exporter.export_filtered(
    10231023            self.student, self.outfile, current_level=200)
Note: See TracChangeset for help on using the changeset viewer.