Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py	(revision 10039)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py	(revision 10040)
@@ -36,4 +36,11 @@
         study_level[ticket.code] = ticket
 
+    def XMLRPC_post(self, body):
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.addHeader('Content-Length', len(body))
+        self.browser.post('http://localhost/app', body,
+            'text/xml; charset=utf-8')
+        return self.browser.contents
+
     def test_get_student_id_no_match(self):
         # w/o any students we get none
@@ -49,23 +56,4 @@
         self.assertEqual(result, 'K1000000')
         self.assertEqual(self.student_id, result)
-        return
-
-    def test_get_student_id_block_unauthorized(self):
-        # requests from unauthorized users are blocked
-        # no username nor password
-        server = ServerProxy('http://localhost/app')
-        self.assertRaises(
-            xmlrpclib.ProtocolError, server.get_student_id, '123')
-        # wrong password
-        server = ServerProxy('http://mgr:WRONGPW@localhost/app')
-        self.assertRaises(
-            xmlrpclib.ProtocolError, server.get_student_id, '123')
-        # wrong username
-        server = ServerProxy('http://WRONGUSER:mgrpw@localhost/app')
-        self.assertRaises(
-            xmlrpclib.ProtocolError, server.get_student_id, '123')
-        return
-
-    def test_XMLRPC_post_1(self):
         REQUEST_XML="""\
 <?xml version="1.0"?>
@@ -88,9 +76,22 @@
 </methodResponse>
 """
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.addHeader('Content-Length', len(REQUEST_XML))
-        self.browser.post('http://localhost/app', REQUEST_XML,
-            'text/xml; charset=utf-8')
-        self.assertEqual(self.browser.contents, RESPONSE_XML)
+        xmlout = self.XMLRPC_post(REQUEST_XML)
+        self.assertEqual(xmlout, RESPONSE_XML)
+        return
+
+    def test_get_student_id_block_unauthorized(self):
+        # requests from unauthorized users are blocked
+        # no username nor password
+        server = ServerProxy('http://localhost/app')
+        self.assertRaises(
+            xmlrpclib.ProtocolError, server.get_student_id, '123')
+        # wrong password
+        server = ServerProxy('http://mgr:WRONGPW@localhost/app')
+        self.assertRaises(
+            xmlrpclib.ProtocolError, server.get_student_id, '123')
+        # wrong username
+        server = ServerProxy('http://WRONGUSER:mgrpw@localhost/app')
+        self.assertRaises(
+            xmlrpclib.ProtocolError, server.get_student_id, '123')
         return
 
@@ -108,8 +109,4 @@
         self.assertEqual(result,
             {'100|CRS1': 'Course 1', '100|COURSE1': 'Unnamed Course'})
-        return
-
-    def test_XMLRPC_post_2(self):
-        self.setup_student(self.student)
         REQUEST_XML="""\
 <?xml version="1.0"?>
@@ -141,9 +138,6 @@
 </methodResponse>
 """
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.addHeader('Content-Length', len(REQUEST_XML))
-        self.browser.post('http://localhost/app', REQUEST_XML,
-            'text/xml; charset=utf-8')
-        self.assertEqual(self.browser.contents, RESPONSE_XML)
+        xmlout = self.XMLRPC_post(REQUEST_XML)
+        self.assertEqual(xmlout, RESPONSE_XML)
         return
 
@@ -154,6 +148,35 @@
         self.assertEqual(result, None)
         result = server.get_students_by_course('CRS1', '2012')
-        self.assertEqual(result, ['K1000000|234|my adviser'])
+        self.assertEqual(result, [['K1000000', '234', 'my adviser'],])
         result = server.get_students_by_course('CRS1')
-        self.assertEqual(result, ['K1000000|234|my adviser'])
+        self.assertEqual(result, [['K1000000', '234', 'my adviser'],])
+        REQUEST_XML="""\
+<?xml version="1.0"?>
+<methodCall>
+<methodName>get_students_by_course</methodName>
+<params>
+<param>
+<value><string>CRS1</string></value>
+<value><string>2012</string></value>
+</param>
+</params>
+</methodCall>"""
+        RESPONSE_XML="""\
+<?xml version='1.0'?>
+<methodResponse>
+<params>
+<param>
+<value><array><data>
+<value><array><data>
+<value><string>K1000000</string></value>
+<value><string>234</string></value>
+<value><string>my adviser</string></value>
+</data></array></value>
+</data></array></value>
+</param>
+</params>
+</methodResponse>
+"""
+        xmlout = self.XMLRPC_post(REQUEST_XML)
+        self.assertEqual(xmlout, RESPONSE_XML)
         return
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py	(revision 10039)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py	(revision 10040)
@@ -116,5 +116,5 @@
         hitlist = []
         for ticket in coursetickets:
-            hitlist.append('%s|%s|%s' % (
+            hitlist.append((
                 ticket.student.student_id,
                 ticket.student.matric_number,
