Changeset 9832 for main/waeup.kofa/trunk
- Timestamp:
- 6 Jan 2013, 07:19:41 (12 years ago)
- 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 250 250 251 251 252 class PaymentsExporter(grok.GlobalUtility, StudentExporterBase):252 class StudentPaymentsExporter(grok.GlobalUtility, StudentExporterBase): 253 253 """Exporter for OnlinePayment instances. 254 254 """ … … 275 275 value = getattr(student, name, None) 276 276 return super( 277 PaymentsExporter, self).mangle_value(277 StudentPaymentsExporter, self).mangle_value( 278 278 value, name, context=context) 279 279 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r9825 r9832 8 8 from waeup.kofa.students.export import ( 9 9 StudentsExporter, StudentStudyCourseExporter, StudentStudyLevelExporter, 10 CourseTicketExporter, PaymentsExporter, BedTicketsExporter,10 CourseTicketExporter, StudentPaymentsExporter, BedTicketsExporter, 11 11 StudentPaymentsOverviewExporter, StudentStudyLevelsOverviewExporter, 12 12 get_students,) … … 571 571 return 572 572 573 class PaymentsExporterTest(StudentImportExportSetup):573 class StudentPaymentsExporterTest(StudentImportExportSetup): 574 574 575 575 layer = FunctionalLayer 576 576 577 577 def setUp(self): 578 super( PaymentsExporterTest, self).setUp()578 super(StudentPaymentsExporterTest, self).setUp() 579 579 self.setup_for_export() 580 580 return … … 582 582 def test_ifaces(self): 583 583 # make sure we fullfill interface contracts 584 obj = PaymentsExporter()584 obj = StudentPaymentsExporter() 585 585 verifyObject(ICSVStudentExporter, obj) 586 verifyClass(ICSVStudentExporter, PaymentsExporter)586 verifyClass(ICSVStudentExporter, StudentPaymentsExporter) 587 587 return 588 588 … … 597 597 payment = StudentOnlinePayment() 598 598 payment.creation_date = datetime.datetime(2012, 4, 1, 13, 12, 1) 599 exporter = PaymentsExporter()599 exporter = StudentPaymentsExporter() 600 600 exporter.export([payment], self.outfile) 601 601 result = open(self.outfile, 'rb').read() … … 615 615 self.setup_student(self.student) 616 616 payment = self.student['payments']['my-payment'] 617 exporter = PaymentsExporter()617 exporter = StudentPaymentsExporter() 618 618 exporter.export([payment], self.outfile) 619 619 result = open(self.outfile, 'rb').read() … … 634 634 # set values we can expect in export file 635 635 self.setup_student(self.student) 636 exporter = PaymentsExporter()636 exporter = StudentPaymentsExporter() 637 637 exporter.export_all(self.app, self.outfile) 638 638 result = open(self.outfile, 'rb').read() … … 653 653 # set values we can expect in export file 654 654 self.setup_student(self.student) 655 exporter = PaymentsExporter()655 exporter = StudentPaymentsExporter() 656 656 exporter.export_student(self.student, self.outfile) 657 657 result = open(self.outfile, 'rb').read() … … 674 674 notify(grok.ObjectModifiedEvent(self.student)) 675 675 676 exporter = PaymentsExporter()676 exporter = StudentPaymentsExporter() 677 677 exporter.export_filtered( 678 678 self.student, self.outfile, current_level=200)
Note: See TracChangeset for help on using the changeset viewer.