Changeset 12865 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 20 Apr 2015, 06:42:44 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r12568 r12865 29 29 from waeup.kofa.students.export import ( 30 30 StudentExporter, StudentStudyCourseExporter, StudentStudyLevelExporter, 31 CourseTicketExporter, StudentPayment sExporter, BedTicketsExporter,31 CourseTicketExporter, StudentPaymentExporter, BedTicketExporter, 32 32 StudentPaymentsOverviewExporter, StudentStudyLevelsOverviewExporter, 33 33 ComboCardDataExporter, DataForBursaryExporter, … … 712 712 return 713 713 714 class StudentPayment sExporterTest(StudentImportExportSetup):714 class StudentPaymentExporterTest(StudentImportExportSetup): 715 715 716 716 layer = FunctionalLayer 717 717 718 718 def setUp(self): 719 super(StudentPayment sExporterTest, self).setUp()719 super(StudentPaymentExporterTest, self).setUp() 720 720 self.setup_for_export() 721 721 return … … 723 723 def test_ifaces(self): 724 724 # make sure we fullfill interface contracts 725 obj = StudentPayment sExporter()725 obj = StudentPaymentExporter() 726 726 verifyObject(ICSVStudentExporter, obj) 727 verifyClass(ICSVStudentExporter, StudentPayment sExporter)727 verifyClass(ICSVStudentExporter, StudentPaymentExporter) 728 728 return 729 729 … … 738 738 payment = StudentOnlinePayment() 739 739 payment.creation_date = datetime.datetime(2012, 4, 1, 13, 12, 1) 740 exporter = StudentPayment sExporter()740 exporter = StudentPaymentExporter() 741 741 exporter.export([payment], self.outfile) 742 742 result = open(self.outfile, 'rb').read() … … 756 756 self.setup_student(self.student) 757 757 payment = self.student['payments']['my-payment'] 758 exporter = StudentPayment sExporter()758 exporter = StudentPaymentExporter() 759 759 exporter.export([payment], self.outfile) 760 760 result = open(self.outfile, 'rb').read() … … 775 775 # set values we can expect in export file 776 776 self.setup_student(self.student) 777 exporter = StudentPayment sExporter()777 exporter = StudentPaymentExporter() 778 778 exporter.export_all(self.app, self.outfile) 779 779 result = open(self.outfile, 'rb').read() … … 794 794 # set values we can expect in export file 795 795 self.setup_student(self.student) 796 exporter = StudentPayment sExporter()796 exporter = StudentPaymentExporter() 797 797 exporter.export_student(self.student, self.outfile) 798 798 result = open(self.outfile, 'rb').read() … … 815 815 notify(grok.ObjectModifiedEvent(self.student)) 816 816 817 exporter = StudentPayment sExporter()817 exporter = StudentPaymentExporter() 818 818 exporter.export_filtered( 819 819 self.student, self.outfile, current_level=200) … … 836 836 self.app['students'].addStudent(self.student) 837 837 notify(grok.ObjectModifiedEvent(self.student)) 838 exporter = StudentPayment sExporter()838 exporter = StudentPaymentExporter() 839 839 # A key xxx does not exist 840 840 self.assertRaises( … … 926 926 return 927 927 928 class BedTicket sExporterTest(StudentImportExportSetup):928 class BedTicketExporterTest(StudentImportExportSetup): 929 929 930 930 layer = FunctionalLayer 931 931 932 932 def setUp(self): 933 super(BedTicket sExporterTest, self).setUp()933 super(BedTicketExporterTest, self).setUp() 934 934 self.setup_for_export() 935 935 return … … 937 937 def test_ifaces(self): 938 938 # make sure we fullfill interface contracts 939 obj = BedTicket sExporter()939 obj = BedTicketExporter() 940 940 verifyObject(ICSVStudentExporter, obj) 941 verifyClass(ICSVStudentExporter, BedTicket sExporter)941 verifyClass(ICSVStudentExporter, BedTicketExporter) 942 942 return 943 943 … … 953 953 bed = self.app['hostels']['hall-1']['hall-1_A_101_A'] 954 954 bedticket.bed = bed 955 exporter = BedTicket sExporter()955 exporter = BedTicketExporter() 956 956 exporter.export([bedticket], self.outfile) 957 957 result = open(self.outfile, 'rb').read() … … 969 969 self.setup_student(self.student) 970 970 bedticket = self.student['accommodation']['2004'] 971 exporter = BedTicket sExporter()971 exporter = BedTicketExporter() 972 972 exporter.export([bedticket], self.outfile) 973 973 result = open(self.outfile, 'rb').read() … … 985 985 # set values we can expect in export file 986 986 self.setup_student(self.student) 987 exporter = BedTicket sExporter()987 exporter = BedTicketExporter() 988 988 exporter.export_all(self.app, self.outfile) 989 989 result = open(self.outfile, 'rb').read() … … 1001 1001 # set values we can expect in export file 1002 1002 self.setup_student(self.student) 1003 exporter = BedTicket sExporter()1003 exporter = BedTicketExporter() 1004 1004 exporter.export_student(self.student, self.outfile) 1005 1005 result = open(self.outfile, 'rb').read() … … 1019 1019 notify(grok.ObjectModifiedEvent(self.student)) 1020 1020 1021 exporter = BedTicket sExporter()1021 exporter = BedTicketExporter() 1022 1022 exporter.export_filtered( 1023 1023 self.student, self.outfile, current_level=200)
Note: See TracChangeset for help on using the changeset viewer.