Changeset 9832 for main/waeup.kofa/trunk


Ignore:
Timestamp:
6 Jan 2013, 07:19:41 (12 years ago)
Author:
Henrik Bettermann
Message:

Rename PaymentsExporter?.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

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

    r9807 r9832  
    250250
    251251
    252 class PaymentsExporter(grok.GlobalUtility, StudentExporterBase):
     252class StudentPaymentsExporter(grok.GlobalUtility, StudentExporterBase):
    253253    """Exporter for OnlinePayment instances.
    254254    """
     
    275275                value = getattr(student, name, None)
    276276        return super(
    277             PaymentsExporter, self).mangle_value(
     277            StudentPaymentsExporter, self).mangle_value(
    278278            value, name, context=context)
    279279
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r9825 r9832  
    88from waeup.kofa.students.export import (
    99    StudentsExporter, StudentStudyCourseExporter, StudentStudyLevelExporter,
    10     CourseTicketExporter, PaymentsExporter, BedTicketsExporter,
     10    CourseTicketExporter, StudentPaymentsExporter, BedTicketsExporter,
    1111    StudentPaymentsOverviewExporter, StudentStudyLevelsOverviewExporter,
    1212    get_students,)
     
    571571        return
    572572
    573 class PaymentsExporterTest(StudentImportExportSetup):
     573class StudentPaymentsExporterTest(StudentImportExportSetup):
    574574
    575575    layer = FunctionalLayer
    576576
    577577    def setUp(self):
    578         super(PaymentsExporterTest, self).setUp()
     578        super(StudentPaymentsExporterTest, self).setUp()
    579579        self.setup_for_export()
    580580        return
     
    582582    def test_ifaces(self):
    583583        # make sure we fullfill interface contracts
    584         obj = PaymentsExporter()
     584        obj = StudentPaymentsExporter()
    585585        verifyObject(ICSVStudentExporter, obj)
    586         verifyClass(ICSVStudentExporter, PaymentsExporter)
     586        verifyClass(ICSVStudentExporter, StudentPaymentsExporter)
    587587        return
    588588
     
    597597        payment = StudentOnlinePayment()
    598598        payment.creation_date = datetime.datetime(2012, 4, 1, 13, 12, 1)
    599         exporter = PaymentsExporter()
     599        exporter = StudentPaymentsExporter()
    600600        exporter.export([payment], self.outfile)
    601601        result = open(self.outfile, 'rb').read()
     
    615615        self.setup_student(self.student)
    616616        payment = self.student['payments']['my-payment']
    617         exporter = PaymentsExporter()
     617        exporter = StudentPaymentsExporter()
    618618        exporter.export([payment], self.outfile)
    619619        result = open(self.outfile, 'rb').read()
     
    634634        # set values we can expect in export file
    635635        self.setup_student(self.student)
    636         exporter = PaymentsExporter()
     636        exporter = StudentPaymentsExporter()
    637637        exporter.export_all(self.app, self.outfile)
    638638        result = open(self.outfile, 'rb').read()
     
    653653        # set values we can expect in export file
    654654        self.setup_student(self.student)
    655         exporter = PaymentsExporter()
     655        exporter = StudentPaymentsExporter()
    656656        exporter.export_student(self.student, self.outfile)
    657657        result = open(self.outfile, 'rb').read()
     
    674674        notify(grok.ObjectModifiedEvent(self.student))
    675675
    676         exporter = PaymentsExporter()
     676        exporter = StudentPaymentsExporter()
    677677        exporter.export_filtered(
    678678            self.student, self.outfile, current_level=200)
Note: See TracChangeset for help on using the changeset viewer.