0001-toulouse-maelis-reproduce-wcs-trace-on-SoapError-734.patch
tests/data/toulouse_maelis/R_read_school_for_adress_and_level_soap_error.xml | ||
---|---|---|
1 |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> |
|
2 |
<soap:Body> |
|
3 |
<soap:Fault> |
|
4 |
<faultcode>soap:Server</faultcode> |
|
5 |
<faultstring>E19 : La voie est obligatoire</faultstring> |
|
6 |
<detail> |
|
7 |
<ns1:MaelisSiteException xmlns:ns1="site.ws.maelis.sigec.com"> |
|
8 |
<message xmlns:ns2="site.ws.maelis.sigec.com">E19 : La voie est obligatoire</message> |
|
9 |
<code xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="site.ws.maelis.sigec.com" xsi:nil="true"/> |
|
10 |
</ns1:MaelisSiteException> |
|
11 |
</detail> |
|
12 |
</soap:Fault> |
|
13 |
</soap:Body> |
|
14 |
</soap:Envelope> |
tests/test_toulouse_maelis.py | ||
---|---|---|
4408 | 4408 |
resp = app.get(url, params={'id_street': '2317', 'num': '4', 'year': '2022'}) |
4409 | 4409 |
assert resp.json['err'] == 0 |
4410 | 4410 |
assert len(resp.json['data']) == 8 |
4411 | 4411 |
for item in resp.json['data']: |
4412 | 4412 |
assert 'id' in item |
4413 | 4413 |
assert 'text' in item |
4414 | 4414 | |
4415 | 4415 | |
4416 |
def test_read_school_list_address_and_level_soap_error(site_service, con, app): |
|
4417 |
site_service.add_soap_response( |
|
4418 |
'readSchoolForAdressAndLevel', get_xml_file('R_read_school_for_adress_and_level_soap_error.xml'), status=500, |
|
4419 |
) |
|
4420 |
url = get_endpoint('read-schools-for-address-and-level') |
|
4421 |
resp = app.get(url, params={'id_street': '', 'num': '', 'year': ''}) |
|
4422 |
assert resp.json['err'] == 'Site-readSchoolForAdressAndLevel-soap:Server' |
|
4423 | ||
4424 | ||
4416 | 4425 |
def test_read_school_list_child_and_level(family_service, con, app): |
4417 | 4426 |
family_service.add_soap_response( |
4418 | 4427 |
'readSchoolForChildAndLevel', get_xml_file('R_read_school_for_child_and_level.xml') |
4419 | 4428 |
) |
4420 | 4429 |
url = get_endpoint('read-schools-for-child-and-level') |
4421 | 4430 |
resp = app.get(url, params={'child_id': '190115', 'year': '2023'}) |
4422 | 4431 |
assert resp.json['err'] == 0 |
4423 | 4432 |
assert len(resp.json['data']) == 1 |
4424 |
- |