Changeset 16391 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 1 Feb 2021, 13:02:45 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py
r16268 r16391 213 213 <value><string>my adviser</string></value> 214 214 <value><double>12.12</double></value> 215 </data></array></value> 216 </data></array></value> 217 </param> 218 </params> 219 </methodResponse> 220 """ 221 xmlout = self.XMLRPC_post(REQUEST_XML) 222 self.assertEqual(xmlout, RESPONSE_XML) 223 return 224 225 def test_get_students_by_department(self): 226 self.setup_student(self.student) 227 server = ServerProxy('http://mgr:mgrpw@localhost/app') 228 result = server.get_students_by_department('fac1','dep1', '2012') 229 self.assertEqual(result, [['COURSE1', 100, 2012, 'K1000000', '234', 'Anna Tester']]) 230 result = server.get_students_by_department('fac1','dep1') 231 self.assertEqual(result, [['COURSE1', 100, 2012, 'K1000000', '234', 'Anna Tester']]) 232 result = server.get_students_by_department('fac1','dep2') 233 self.assertEqual(result, None) 234 REQUEST_XML = """\ 235 <?xml version="1.0"?> 236 <methodCall> 237 <methodName>get_students_by_department</methodName> 238 <params> 239 <param> 240 <value><string>fac1</string></value> 241 <value><string>dep1</string></value> 242 </param> 243 </params> 244 </methodCall>""" 245 RESPONSE_XML = """\ 246 <?xml version='1.0'?> 247 <methodResponse> 248 <params> 249 <param> 250 <value><array><data> 251 <value><array><data> 252 <value><string>COURSE1</string></value> 253 <value><int>100</int></value> 254 <value><int>2012</int></value> 255 <value><string>K1000000</string></value> 256 <value><string>234</string></value> 257 <value><string>Anna Tester</string></value> 215 258 </data></array></value> 216 259 </data></array></value>
Note: See TracChangeset for help on using the changeset viewer.