toulouse-maelis: add tests on agent access providing DUI (#75463) #141
|
@ -0,0 +1,13 @@
|
|||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<soap:Fault>
|
||||
<faultcode>soap:Server</faultcode>
|
||||
<faultstring>=E01 : Le numéro de dossier (numéro famille) ou le nom de famille sont requis </faultstring>
|
||||
<detail>
|
||||
<ns1:MaelisFamilyException xmlns:ns1="family.ws.maelis.sigec.com">
|
||||
<message xmlns:ns2="family.ws.maelis.sigec.com">=E01 : Le numéro de dossier (numéro famille) ou le nom de famille sont requis </message>
|
||||
</ns1:MaelisFamilyException>
|
||||
</detail>
|
||||
</soap:Fault>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
|
@ -0,0 +1,8 @@
|
|||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<soap:Fault>
|
||||
<faultcode>soap:Client</faultcode>
|
||||
<faultstring>Unmarshalling Error: Not a number: abc </faultstring>
|
||||
</soap:Fault>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
|
@ -1331,6 +1331,32 @@ def test_read_family_not_linked_error(con, app):
|
|||
assert resp.json['err_desc'] == 'User not linked to family'
|
||||
|
||||
|
||||
def test_read_family_not_found(family_service, con, app):
|
||||
family_service.add_soap_response('readFamily', get_xml_file('R_read_family_not_found.xml'))
|
||||
url = get_endpoint('read-family')
|
||||
|
||||
resp = app.get(url + '?family_id=000')
|
||||
assert resp.json['err'] == 1
|
||||
assert resp.json['err_class'] == 'passerelle.utils.soap.SOAPFault'
|
||||
assert (
|
||||
'=E01 : Le numéro de dossier (numéro famille) ou le nom de famille sont requis'
|
||||
in resp.json['err_desc']
|
||||
)
|
||||
|
||||
|
||||
def test_read_family_soap_error(family_service, con, app):
|
||||
family_service.add_soap_response('readFamily', get_xml_file('R_read_family_soap_error.xml'))
|
||||
url = get_endpoint('read-family')
|
||||
|
||||
resp = app.get(url + '?family_id=abc')
|
||||
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 "Unmarshalling Error: Not a number: abc "'
|
||||
)
|
||||
|
||||
|
||||
def test_read_rl1(family_service, con, app):
|
||||
family_service.add_soap_response('readFamily', get_xml_file('R_read_family.xml'))
|
||||
url = get_endpoint('read-rl')
|
||||
|
|
Loading…
Reference in New Issue