toulouse-maelis: [tests] add test on school registration error (#82705)
This commit is contained in:
parent
a7ff9bbc4a
commit
d0f4b9ecf9
|
@ -0,0 +1,13 @@
|
||||||
|
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||||
|
<soap:Body>
|
||||||
|
<soap:Fault>
|
||||||
|
<faultcode>soap:Server</faultcode>
|
||||||
|
<faultstring>E25 : Cette personne nappartient pas à cette famille</faultstring>
|
||||||
|
<detail>
|
||||||
|
<ns1:MaelisFamilyException xmlns:ns1="family.ws.maelis.sigec.com">
|
||||||
|
<message xmlns:ns2="family.ws.maelis.sigec.com">E25 : Cette personne nappartient pas à cette famille</message>
|
||||||
|
</ns1:MaelisFamilyException>
|
||||||
|
</detail>
|
||||||
|
</soap:Fault>
|
||||||
|
</soap:Body>
|
||||||
|
</soap:Envelope>
|
|
@ -6220,6 +6220,28 @@ def test_create_child_school_pre_registration(family_service, con, app):
|
||||||
assert resp.json['data']['subscribeSchoolBean']['isWaitList']
|
assert resp.json['data']['subscribeSchoolBean']['isWaitList']
|
||||||
|
|
||||||
|
|
||||||
|
def test_create_child_school_pre_registration_soap_error(family_service, con, app):
|
||||||
|
family_service.add_soap_response(
|
||||||
|
'preSubscribeSchoolPerim', get_xml_file('R_create_child_school_pre_registration_soap_error.xml')
|
||||||
|
)
|
||||||
|
url = get_endpoint('create-child-school-pre-registration')
|
||||||
|
resp = app.post_json(
|
||||||
|
url,
|
||||||
|
params={
|
||||||
|
'numPerson': '248460',
|
||||||
|
'schoolYear': '2023',
|
||||||
|
'levelCode': 'CM1',
|
||||||
|
'dateSubscribe': '2023-09-01T00:00:00+02:00',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
assert resp.json['err'] == 1
|
||||||
|
assert resp.json['err_class'] == 'passerelle.utils.soap.SOAPFault'
|
||||||
|
assert (
|
||||||
|
resp.json['err_desc']
|
||||||
|
== 'SOAP service at https://example.org/FamilyService?wsdl returned an error "E25 : Cette personne nappartient pas à cette famille"'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_create_child_school_pre_registration_with_exemption(family_service, con, app):
|
def test_create_child_school_pre_registration_with_exemption(family_service, con, app):
|
||||||
family_service.add_soap_response(
|
family_service.add_soap_response(
|
||||||
'presubscribeSchoolDerog', get_xml_file('R_create_child_school_pre_registration_with_exemption.xml')
|
'presubscribeSchoolDerog', get_xml_file('R_create_child_school_pre_registration_with_exemption.xml')
|
||||||
|
|
Loading…
Reference in New Issue