Ignore:
Timestamp:
23 Jan 2017, 15:58:02 (8 years ago)
Author:
Henrik Bettermann
Message:

Get set of selected students also from list of matric numbers.

File:
1 edited

Legend:

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

    r14366 r14443  
    422422        return
    423423
    424     def test_export_selected(self):
     424    def test_export_selected_student_id(self):
    425425        # we can export a filtered set of students (filtered by session/level)
    426426        self.setup_student(self.student)
     
    430430        exporter.export_selected(
    431431            self.app, self.outfile, selected=['A111111'])
     432        result = open(self.outfile, 'rb').read()
     433        self.assertEqual(
     434            result,
     435            'certificate,current_level,current_session,current_verdict,'
     436            'entry_mode,entry_session,previous_verdict,student_id\r\n'
     437
     438            'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n'
     439            )
     440        return
     441
     442    def test_export_selected_matric_number(self):
     443        # we can export a filtered set of students (filtered by session/level)
     444        self.setup_student(self.student)
     445        self.app['students'].addStudent(self.student)
     446        notify(grok.ObjectModifiedEvent(self.student))
     447        exporter = StudentStudyCourseExporter()
     448        exporter.export_selected(
     449            self.app, self.outfile, selected=['234'])
    432450        result = open(self.outfile, 'rb').read()
    433451        self.assertEqual(
Note: See TracChangeset for help on using the changeset viewer.