Changeset 16859 for main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Timestamp:
- 4 Mar 2022, 21:27:24 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py
r16617 r16859 12 12 CustomCourseTicketExporter, 13 13 LevelReportDataExporter, 14 CustomStudentStudyCourseExporter) 14 CustomStudentStudyCourseExporter, 15 OutstandingCourses2Exporter) 15 16 from waeup.aaue.testing import FunctionalLayer 16 17 … … 226 227 return 227 228 228 229 class OutstandingCourses2ExporterTest(StudentImportExportSetup): 230 231 layer = FunctionalLayer 232 233 def setUp(self): 234 super(OutstandingCourses2ExporterTest, self).setUp() 235 self.setup_for_export() 236 return 237 238 def test_export_all(self): 239 # we can really export all course tickets 240 # set values we can expect in export file 241 self.setup_student(self.student) 242 self.student['studycourse']['100']['CRS1'].course_category = 'C' 243 exporter = OutstandingCourses2Exporter() 244 exporter.export_all(self.app, self.outfile) 245 result = open(self.outfile, 'rb').read() 246 self.assertEqual( 247 result, 248 'student_id,matric_number,certcode,display_fullname,code,' 249 'course_category,remark\r\n' 250 'A111111,234,CERT1,"TESTER, Anna M.",CRS1,C,nottaken\r\n' 251 ) 252 return 253 254
Note: See TracChangeset for help on using the changeset viewer.