Ignore:
Timestamp:
18 Mar 2013, 10:56:41 (12 years ago)
Author:
Henrik Bettermann
Message:

Add web service method which gets the ids and matric numbers of students registered for a certain course in a certain session.

File:
1 edited

Legend:

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

    r10037 r10038  
    2020        study_level.level_verdict = "A"
    2121        study_level.level = 100
     22        study_level.validated_by = u"my adviser"
    2223        student['studycourse'].addStudentStudyLevel(
    2324            self.certificate, study_level)
     
    146147        self.assertEqual(self.browser.contents, RESPONSE_XML)
    147148        return
     149
     150    def test_get_students_by_course(self):
     151        self.setup_student(self.student)
     152        server = ServerProxy('http://mgr:mgrpw@localhost/app')
     153        result = server.get_students_by_course('CRS1', '2010')
     154        self.assertEqual(result, None)
     155        result = server.get_students_by_course('CRS1', '2012')
     156        self.assertEqual(result, ['K1000000|234|my adviser'])
     157        result = server.get_students_by_course('CRS1')
     158        self.assertEqual(result, ['K1000000|234|my adviser'])
     159        return
Note: See TracChangeset for help on using the changeset viewer.