Changeset 10508 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 19 Aug 2013, 08:06:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py
r10505 r10508 331 331 ) 332 332 return 333 334 def test_get_moodle_data(self): 335 server = ServerProxy('http://mgr:mgrpw@localhost/app') 336 self.setup_student(self.student) 337 result = server.get_moodle_data(self.student.student_id) 338 self.assertEqual(result, 339 {'lastname': 'Tester', 'email': 'aa@aa.ng', 'firstname': 'Anna'}) 340 REQUEST_XML = """\ 341 <?xml version="1.0"?> 342 <methodCall> 343 <methodName>get_moodle_data</methodName> 344 <params> 345 <param> 346 <value><string>K1000000</string></value> 347 </param> 348 </params> 349 </methodCall>""" 350 RESPONSE_XML = """\ 351 <?xml version='1.0'?> 352 <methodResponse> 353 <params> 354 <param> 355 <value><struct> 356 <member> 357 <name>lastname</name> 358 <value><string>Tester</string></value> 359 </member> 360 <member> 361 <name>email</name> 362 <value><string>aa@aa.ng</string></value> 363 </member> 364 <member> 365 <name>firstname</name> 366 <value><string>Anna</string></value> 367 </member> 368 </struct></value> 369 </param> 370 </params> 371 </methodResponse> 372 """ 373 xmlout = self.XMLRPC_post(REQUEST_XML) 374 self.assertEqual(xmlout, RESPONSE_XML) 375 return
Note: See TracChangeset for help on using the changeset viewer.