toulouse-maelis: reproduce wcs trace on SoapError (#73411)

This commit is contained in:
Nicolas Roche 2023-01-13 20:00:49 +01:00
parent 4ec5a74d3e
commit d1a4921ea7
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>E19 : La voie est obligatoire</faultstring>
<detail>
<ns1:MaelisSiteException xmlns:ns1="site.ws.maelis.sigec.com">
<message xmlns:ns2="site.ws.maelis.sigec.com">E19 : La voie est obligatoire</message>
<code xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="site.ws.maelis.sigec.com" xsi:nil="true"/>
</ns1:MaelisSiteException>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>

View File

@ -4413,6 +4413,15 @@ def test_read_school_list_address_and_level(site_service, con, app):
assert 'text' in item
def test_read_school_list_address_and_level_soap_error(site_service, con, app):
site_service.add_soap_response(
'readSchoolForAdressAndLevel', get_xml_file('R_read_school_for_adress_and_level_soap_error.xml'), status=500,
)
url = get_endpoint('read-schools-for-address-and-level')
resp = app.get(url, params={'id_street': '', 'num': '', 'year': ''})
assert resp.json['err'] == 'Site-readSchoolForAdressAndLevel-soap:Server'
def test_read_school_list_child_and_level(family_service, con, app):
family_service.add_soap_response(
'readSchoolForChildAndLevel', get_xml_file('R_read_school_for_child_and_level.xml')