Ignore:
Timestamp:
8 Jun 2020, 10:54:31 (4 years ago)
Author:
Henrik Bettermann
Message:

Add webservice to check if graduated student exists.

File:
1 edited

Legend:

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

    r15811 r16110  
    248248<value><string>1234</string></value>
    249249<value><string>aa@aa.ng</string></value>
     250</data></array></value>
     251</param>
     252</params>
     253</methodResponse>
     254"""
     255        xmlout = self.XMLRPC_post(REQUEST_XML)
     256        self.assertEqual(xmlout, RESPONSE_XML)
     257        return
     258
     259    def test_get_grad_student(self):
     260        server = ServerProxy('http://localhost/app')
     261        self.setup_student(self.student)
     262        result = server.get_grad_student('123', 'aa@aa.ng')
     263        self.assertEqual(result,
     264            [True, False])
     265        REQUEST_XML = """\
     266<?xml version="1.0"?>
     267<methodCall>
     268<methodName>get_grad_student</methodName>
     269<params>
     270<param>
     271<value><string>K1000000</string></value>
     272</param>
     273<param>
     274<value><string>aa@aa.ng</string></value>
     275</param>
     276</params>
     277</methodCall>"""
     278        RESPONSE_XML = """\
     279<?xml version='1.0'?>
     280<methodResponse>
     281<params>
     282<param>
     283<value><array><data>
     284<value><boolean>1</boolean></value>
     285<value><boolean>0</boolean></value>
    250286</data></array></value>
    251287</param>
Note: See TracChangeset for help on using the changeset viewer.