toulouse_maelis: update readFamily test data (#69044)

This commit is contained in:
Nicolas Roche 2022-09-06 15:19:16 +02:00
parent b32c2f58dc
commit 6f755b7388
4 changed files with 332 additions and 125 deletions

View File

@ -16,12 +16,14 @@
<emergencyPersonList>
<personList>
<numPerson>614059</numPerson>
<civility>MME</civility>
<firstname>KENY</firstname>
<lastname>ARKANA</lastname>
<dateBirth>1970-01-01</dateBirth>
<quality>MERE</quality>
<quality>T</quality>
<contact>
<phone>0123456789</phone>
<mail>pueblo@example.org</mail>
</contact>
</personList>
<personList>
@ -29,7 +31,7 @@
<firstname>Mathias</firstname>
<lastname>Cassel</lastname>
<dateBirth>1972-01-01</dateBirth>
<quality>PERE</quality>
<quality>O</quality>
<contact>
<phone/>
<mobile>0623456789</mobile>

View File

@ -20,7 +20,7 @@
<firstname>Mathias</firstname>
<lastname>Cassel</lastname>
<dateBirth>1972-01-01</dateBirth>
<quality>PERE</quality>
<quality>O</quality>
<contact>
<phone/>
<mobile>0623456789</mobile>

View File

@ -1,108 +1,196 @@
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:readFamilyResponse xmlns:ns2="family.ws.maelis.sigec.com">
<familyResult>
<number>196514</number>
<number>1312</number>
<category>BI</category>
<situation>M</situation>
<flagCom>true</flagCom>
<nbChild>2</nbChild>
<nbTotalChild>2</nbTotalChild>
<RL1>
<num>613878</num>
<lastname>COSTANZE</lastname>
<firstname>DAMIEN</firstname>
<lastname>DOE</lastname>
<firstname>JHON</firstname>
<quality>PERE</quality>
<civility>M.</civility>
<dateBirth>1980-10-07T00:00:00+01:00</dateBirth>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<adresse>
<idStreet>AV0044</idStreet>
<num>9</num>
<street1>AVENUE VALDILETTA</street1>
<street2>LES MANDARINIERS</street2>
<town>NICE</town>
<zipcode>06100</zipcode>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>
<street1>Chateau d'eau</street1>
<town>Paris</town>
<zipcode>75014</zipcode>
</adresse>
<contact>
<phone>0664107085</phone>
<mobile>0637957391</mobile>
<mail>petro.costache@yahoo.com</mail>
<phone>non</phone>
<mobile>0777777777</mobile>
<mail>djhon@example.org</mail>
<isContactMail>true</isContactMail>
<isContactSms>true</isContactSms>
<isInvoicePdf>true</isInvoicePdf>
</contact>
<CAFInfo>
<number>51</number>
</CAFInfo>
<profession>
<addressPro/>
</profession>
</RL1>
<RL2>
<num>613879</num>
<lastname>COSTANZE</lastname>
<firstname>JENNIFER</firstname>
<lastname>DOE</lastname>
<firstname>JANE</firstname>
<quality>MERE</quality>
<civility>MME</civility>
<dateBirth>1987-05-21T00:00:00+02:00</dateBirth>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<adresse>
<idStreet>AV0044</idStreet>
<num>9</num>
<street1>AVENUE VALDILETTA</street1>
<street2>LES MANDARINIERS</street2>
<town>NICE</town>
<zipcode>06100</zipcode>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>
<street1>Chateau d'eau</street1>
<town>Paris</town>
<zipcode>75014</zipcode>
</adresse>
<contact>
<isContactMail>false</isContactMail>
<isContactSms>false</isContactSms>
<isInvoicePdf>false</isInvoicePdf>
</contact>
<profession>
<codeCSP>ART</codeCSP>
<profession>informaticien</profession>
<employerName>EO</employerName>
<phone>0123456789</phone>
<addressPro>
<town>Orl&#233;ans</town>
</addressPro>
</profession>
<CAFInfo>
<number>51</number>
<number>789</number>
<organ>ma caf</organ>
</CAFInfo>
</RL2>
<emergencyPersonList>
<num>614059</num>
<id>S10032140599</id>
<id>S10032141697</id>
<firstname>KENY</firstname>
<lastname>ARKANA</lastname>
<quality>MERE</quality>
<dateBirth>1982-12-20T00:00:00+01:00</dateBirth>
<quality>T</quality>
<civility>MME</civility>
<contact>
<phone>0123456789</phone>
<mail>pueblo@example.org</mail>
</contact>
</emergencyPersonList>
<authorizedPersonList>
<numPerson>614058</numPerson>
<numPerson>614121</numPerson>
<firstname>CATHY</firstname>
<lastname>PALENNE</lastname>
<dateBirth>1975-06-28T00:00:00+01:00</dateBirth>
<quality>PERE</quality>
<quality>O</quality>
<contact>
<phone>0123456789</phone>
<mobile>0623456789</mobile>
</contact>
</authorizedPersonList>
<childList>
<num>613880</num>
<lastname>COSTANZE</lastname>
<firstname>CASSANDRA</firstname>
<lastname>DOE</lastname>
<firstname>JANNIS</firstname>
<sexe>F</sexe>
<birth>
<dateBirth>2021-06-22T00:00:00+02:00</dateBirth>
<dateBirth>1943-01-19T00:00:00+01:00</dateBirth>
</birth>
<dietcode>RSV</dietcode>
<fsl>
<dateDeb>2022-01-01T00:00:00+01:00</dateDeb>
<dateFin>2022-12-31T00:00:00+01:00</dateFin>
<allergieAlimentaire>O</allergieAlimentaire>
<allergieRespiratoire>O</allergieRespiratoire>
<allergieAutre>O</allergieAutre>
<allergieMedicament>O</allergieMedicament>
<asthme>N</asthme>
<flPAI>N</flPAI>
<flImage>N</flImage>
<dtcPrap1>2022-02-22T00:00:00+01:00</dtcPrap1>
<obsMed1>some obsMed1 text</obsMed1>
<obsMed2>some obsMed2 text</obsMed2>
<obsMed3>some obsMed3 text</obsMed3>
<obsDir1>some obsDir1 text</obsDir1>
<obsDir2>some obsDir2 text</obsDir2>
<obsDir3>some obsDir3 text</obsDir3>
<obsAssist1>some obsAssist1 text</obsAssist1>
<obsAssist2>some obsAssist2 text</obsAssist2>
<obsAssist3>some obsAssist3 text</obsAssist3>
<cons1Med>some cons1Med text</cons1Med>
<cons2Med>some cons2Med text</cons2Med>
</fsl>
<bPhoto>false</bPhoto>
<bLeaveAlone>false</bLeaveAlone>
<medicalRecord>
<familyDoctor>
<name>DRE</name>
<phone>0612341234</phone>
<address>
<street1>Alameda</street1>
<zipcode>90220</zipcode>
<town>Compton</town>
</address>
</familyDoctor>
<vaccinList>
<code>ROR</code>
<label>ROUGEOLE-OREILLONS-RUBEOLE</label>
<vaccinationDate>2012-02-22T00:00:00+01:00</vaccinationDate>
</vaccinList>
<vaccinList>
<code>DTC</code>
<label>DIPHTERIE TETANOS COQUELUCHE</label>
<vaccinationDate>2011-01-11T00:00:00+01:00</vaccinationDate>
</vaccinList>
<vaccinList>
<code>ROR</code>
<label>ROUGEOLE-OREILLONS-RUBEOLE</label>
<vaccinationDate>1970-01-11T00:00:00+01:00</vaccinationDate>
</vaccinList>
</medicalRecord>
<mother>
<num>613963</num>
<civility>MME</civility>
<firstname>JANE</firstname>
<lastname>DOE</lastname>
</mother>
<father>
<num>613878</num>
<civility>M.</civility>
<firstname>JHON</firstname>
<lastname>DOE</lastname>
</father>
<paiInfoBean>
<code>PAIALI</code>
<dateDeb>2022-01-01T00:00:00+01:00</dateDeb>
<dateFin>2022-12-31T00:00:00+01:00</dateFin>
<description>bla bla PAI</description>
</paiInfoBean>
</childList>
<childList>
<num>613987</num>
<lastname>DOE</lastname>
<firstname>JOHNNY ALLEN</firstname>
<sexe>M</sexe>
<birth>
<dateBirth>1942-11-27T00:00:00+01:00</dateBirth>
<place>Seattle</place>
</birth>
<dietcode>STD</dietcode>
<bPhoto>false</bPhoto>
<bLeaveAlone>false</bLeaveAlone>
<paiInfoBean/>
</childList>
<childList>
<num>613881</num>
<lastname>COSTANZE</lastname>
<firstname>ALESSANDRO</firstname>
<num>614051</num>
<lastname>DOE</lastname>
<firstname>ROBERT</firstname>
<sexe>M</sexe>
<birth>
<dateBirth>2015-02-17T00:00:00+01:00</dateBirth>
<dateBirth>1941-05-24T00:00:00+02:00</dateBirth>
<place>Duluth</place>
</birth>
<dietcode>STD</dietcode>
<bPhoto>false</bPhoto>
<bPhoto>true</bPhoto>
<bLeaveAlone>false</bLeaveAlone>
<paiInfoBean/>
</childList>

View File

@ -200,9 +200,9 @@ def test_link(mocked_post, mocked_get, con, app):
params = {
'family_id': '1312',
'firstname': 'Damien',
'lastname': 'Costanze',
'dateBirth': '1980-10-07',
'firstname': 'Jhon',
'lastname': 'Doe',
'dateBirth': '1938-07-26',
}
resp = app.post_json(url + '?NameID=local', params=params)
assert Link.objects.count() == 1
@ -515,7 +515,14 @@ def test_read_vaccin_list(mocked_post, mocked_get, con, app):
@mock.patch('passerelle.utils.Request.post')
def test_read_family(mocked_post, mocked_get, con, app):
mocked_get.return_value = FAMILY_SERVICE_WSDL
mocked_post.side_effect = [READ_FAMILY, READ_CATEGORIES, READ_SITUATIONS, READ_CIVILITIES, READ_QUALITIES]
mocked_post.side_effect = [
READ_FAMILY,
READ_CATEGORIES,
READ_SITUATIONS,
READ_CIVILITIES,
READ_QUALITIES,
READ_CSP,
]
url = get_endpoint('read-family')
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -528,12 +535,12 @@ def test_read_family(mocked_post, mocked_get, con, app):
del data['authorizedPersonList']
del data['emergencyPersonList']
assert data == {
'number': 196514,
'number': 1312,
'category': 'BI',
'situation': 'M',
'flagCom': True,
'nbChild': 2,
'nbTotalChild': 2,
'nbTotalChild': None,
'nbAES': None,
'quotientList': [],
'indicatorList': [],
@ -541,65 +548,120 @@ def test_read_family(mocked_post, mocked_get, con, app):
'category_text': 'BIPARENTALE',
'situation_text': 'Marié (e)',
}
assert resp.json['data']['RL1'] == {
data = resp.json['data']['RL1']
del data['profession']
assert data == {
'num': '613878',
'lastname': 'COSTANZE',
'firstname': 'DAMIEN',
'lastname': 'DOE',
'firstname': 'JHON',
'quality': 'PERE',
'quality_text': 'PERE',
'civility': 'M.',
'civility_text': 'Monsieur',
'dateBirth': '1980-10-07T00:00:00+01:00',
'dateBirth': '1938-07-26T00:00:00+01:00',
'adresse': {
'idStreet': 'AV0044',
'num': 9,
'idStreet': None,
'num': 170,
'numComp': None,
'street1': 'AVENUE VALDILETTA',
'street2': 'LES MANDARINIERS',
'town': 'NICE',
'zipcode': '06100',
'street1': "Chateau d'eau",
'street2': None,
'town': 'Paris',
'zipcode': '75014',
},
'contact': {
'phone': '0664107085',
'mobile': '0637957391',
'mail': 'petro.costache@yahoo.com',
'phone': 'non',
'mobile': '0777777777',
'mail': 'djhon@example.org',
'isContactMail': True,
'isContactSms': True,
'isInvoicePdf': True,
},
'profession': None,
'CAFInfo': {'number': '51', 'organ': None},
'CAFInfo': None,
'civility_text': 'Monsieur',
'quality_text': 'PERE',
}
assert resp.json['data']['childList'][0] == {
data = resp.json['data']['childList'][0]
del data['fsl']
del data['medicalRecord']
assert data == {
'num': '613880',
'lastname': 'COSTANZE',
'firstname': 'CASSANDRA',
'lastname': 'DOE',
'firstname': 'JANNIS',
'sexe': 'F',
'sexe_text': 'Féminin',
'birth': {'dateBirth': '2021-06-22T00:00:00+02:00', 'place': None},
'dietcode': 'STD',
'fsl': None,
'birth': {'dateBirth': '1943-01-19T00:00:00+01:00', 'place': None},
'dietcode': 'RSV',
'bPhoto': False,
'bLeaveAlone': False,
'authorizedPersonList': [],
'indicatorList': [],
'medicalRecord': None,
'subscribeSchoolList': [],
'mother': None,
'father': None,
'mother': {'num': 613963, 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE'},
'father': {'num': 613878, 'civility': 'M.', 'firstname': 'JHON', 'lastname': 'DOE'},
'rl': None,
'subscribeActivityList': [],
'paiInfoBean': None,
'paiInfoBean': {
'code': 'PAIALI',
'dateDeb': '2022-01-01T00:00:00+01:00',
'dateFin': '2022-12-31T00:00:00+01:00',
'description': 'bla bla PAI',
},
}
assert resp.json['data']['childList'][0]['fsl'] == {
'dateDeb': '2022-01-01T00:00:00+01:00',
'dateFin': '2022-12-31T00:00:00+01:00',
'allergieAlimentaire': 'O',
'allergieRespiratoire': 'O',
'allergieAutre': 'O',
'allergieMedicament': 'O',
'asthme': 'N',
'flPAI': 'N',
'flImage': 'N',
'dtcPrap1': '2022-02-22T00:00:00+01:00',
'obsMed1': 'some obsMed1 text',
'obsMed2': 'some obsMed2 text',
'obsMed3': 'some obsMed3 text',
'obsDir1': 'some obsDir1 text',
'obsDir2': 'some obsDir2 text',
'obsDir3': 'some obsDir3 text',
'obsAssist1': 'some obsAssist1 text',
'obsAssist2': 'some obsAssist2 text',
'obsAssist3': 'some obsAssist3 text',
'cons1Med': 'some cons1Med text',
'cons2Med': 'some cons2Med text',
}
assert resp.json['data']['childList'][0]['medicalRecord'] == {
"familyDoctor": {
"name": "DRE",
"phone": "0612341234",
"address": {"street1": "Alameda", "zipcode": "90220", "town": "Compton"},
},
"vaccinList": [
{
"code": "ROR",
"label": "ROUGEOLE-OREILLONS-RUBEOLE",
"vaccinationDate": "2012-02-22T00:00:00+01:00",
},
{
"code": "DTC",
"label": "DIPHTERIE TETANOS COQUELUCHE",
"vaccinationDate": "2011-01-11T00:00:00+01:00",
},
{
"code": "ROR",
"label": "ROUGEOLE-OREILLONS-RUBEOLE",
"vaccinationDate": "1970-01-11T00:00:00+01:00",
},
],
}
assert resp.json['data']['emergencyPersonList'][0] == {
'firstname': 'KENY',
'lastname': 'ARKANA',
'quality': 'MERE',
'civility': None,
'contact': {'phone': '0123456789', 'mobile': None, 'mail': None},
'numPerson': 614059,
'dateBirth': '1970-01-01',
'quality_text': 'MERE',
'quality': 'T',
'civility': 'MME',
'contact': {'phone': '0123456789', 'mobile': None, 'mail': 'pueblo@example.org'},
'numPerson': 614059,
'civility_text': 'Madame',
'quality_text': 'TANTE',
}
@ -615,20 +677,34 @@ def test_read_family_not_linked_error(con, app):
@mock.patch('passerelle.utils.Request.post')
def test_read_rl1(mocked_post, mocked_get, con, app):
mocked_get.return_value = FAMILY_SERVICE_WSDL
mocked_post.side_effect = [READ_FAMILY, READ_CATEGORIES, READ_SITUATIONS, READ_CIVILITIES, READ_QUALITIES]
mocked_post.side_effect = [
READ_FAMILY,
READ_CATEGORIES,
READ_SITUATIONS,
READ_CIVILITIES,
READ_QUALITIES,
READ_CSP,
]
url = get_endpoint('read-rl')
Link.objects.create(resource=con, family_id='1312', name_id='local')
resp = app.get(url + '?NameID=local&rl_id=613878')
assert resp.json['err'] == 0
assert resp.json['data']['firstname'] == 'DAMIEN'
assert resp.json['data']['firstname'] == 'JHON'
@mock.patch('passerelle.utils.Request.get')
@mock.patch('passerelle.utils.Request.post')
def test_read_rl2(mocked_post, mocked_get, con, app):
mocked_get.return_value = FAMILY_SERVICE_WSDL
mocked_post.side_effect = [READ_FAMILY, READ_CATEGORIES, READ_SITUATIONS, READ_CIVILITIES, READ_QUALITIES]
mocked_post.side_effect = [
READ_FAMILY,
READ_CATEGORIES,
READ_SITUATIONS,
READ_CIVILITIES,
READ_QUALITIES,
READ_CSP,
]
url = get_endpoint('read-rl')
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -636,19 +712,19 @@ def test_read_rl2(mocked_post, mocked_get, con, app):
assert resp.json['err'] == 0
assert resp.json['data'] == {
'num': '613879',
'lastname': 'COSTANZE',
'firstname': 'JENNIFER',
'lastname': 'DOE',
'firstname': 'JANE',
'quality': 'MERE',
'civility': 'MME',
'dateBirth': '1987-05-21T00:00:00+02:00',
'dateBirth': '1940-06-22T00:00:00+02:00',
'adresse': {
'idStreet': 'AV0044',
'num': 9,
'idStreet': None,
'num': 170,
'numComp': None,
'street1': 'AVENUE VALDILETTA',
'street2': 'LES MANDARINIERS',
'town': 'NICE',
'zipcode': '06100',
'street1': "Chateau d'eau",
'street2': None,
'town': 'Paris',
'zipcode': '75014',
},
'contact': {
'phone': None,
@ -658,8 +734,15 @@ def test_read_rl2(mocked_post, mocked_get, con, app):
'isContactSms': False,
'isInvoicePdf': False,
},
'profession': None,
'CAFInfo': {'number': '51', 'organ': None},
'profession': {
'codeCSP': 'ART',
'profession': 'informaticien',
'employerName': 'EO',
'phone': '0123456789',
'addressPro': {'num': None, 'street': None, 'zipcode': None, 'town': 'Orléans'},
'codeCSP_text': 'ARTISAN',
},
'CAFInfo': {'number': '789', 'organ': 'ma caf'},
'civility_text': 'Madame',
'quality_text': 'MERE',
}
@ -677,7 +760,14 @@ def test_read_rl_not_linked_error(con, app):
@mock.patch('passerelle.utils.Request.post')
def test_read_rl_not_found(mocked_post, mocked_get, con, app):
mocked_get.return_value = FAMILY_SERVICE_WSDL
mocked_post.side_effect = [READ_FAMILY, READ_CATEGORIES, READ_SITUATIONS, READ_CIVILITIES, READ_QUALITIES]
mocked_post.side_effect = [
READ_FAMILY,
READ_CATEGORIES,
READ_SITUATIONS,
READ_CIVILITIES,
READ_QUALITIES,
READ_CSP,
]
url = get_endpoint('read-rl')
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -690,7 +780,14 @@ def test_read_rl_not_found(mocked_post, mocked_get, con, app):
@mock.patch('passerelle.utils.Request.post')
def test_read_person(mocked_post, mocked_get, con, app):
mocked_get.return_value = FAMILY_SERVICE_WSDL
mocked_post.side_effect = [READ_FAMILY, READ_CATEGORIES, READ_SITUATIONS, READ_CIVILITIES, READ_QUALITIES]
mocked_post.side_effect = [
READ_FAMILY,
READ_CATEGORIES,
READ_SITUATIONS,
READ_CIVILITIES,
READ_QUALITIES,
READ_CSP,
]
url = get_endpoint('read-person')
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -719,7 +816,14 @@ def test_read_person_not_linked_error(con, app):
@mock.patch('passerelle.utils.Request.post')
def test_read_person_not_found(mocked_post, mocked_get, con, app):
mocked_get.return_value = FAMILY_SERVICE_WSDL
mocked_post.side_effect = [READ_FAMILY, READ_CATEGORIES, READ_SITUATIONS, READ_CIVILITIES, READ_QUALITIES]
mocked_post.side_effect = [
READ_FAMILY,
READ_CATEGORIES,
READ_SITUATIONS,
READ_CIVILITIES,
READ_QUALITIES,
READ_CSP,
]
url = get_endpoint('read-person')
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -732,13 +836,20 @@ def test_read_person_not_found(mocked_post, mocked_get, con, app):
@mock.patch('passerelle.utils.Request.post')
def test_read_child(mocked_post, mocked_get, con, app):
mocked_get.return_value = FAMILY_SERVICE_WSDL
mocked_post.side_effect = [READ_FAMILY, READ_CATEGORIES, READ_SITUATIONS, READ_CIVILITIES, READ_QUALITIES]
mocked_post.side_effect = [
READ_FAMILY,
READ_CATEGORIES,
READ_SITUATIONS,
READ_CIVILITIES,
READ_QUALITIES,
READ_CSP,
]
url = get_endpoint('read-child')
Link.objects.create(resource=con, family_id='1312', name_id='local')
resp = app.get(url + '?NameID=local&child_id=613880')
assert resp.json['err'] == 0
assert resp.json['data']['firstname'] == 'CASSANDRA'
assert resp.json['data']['firstname'] == 'JANNIS'
def test_read_child_not_linked_error(con, app):
@ -753,7 +864,14 @@ def test_read_child_not_linked_error(con, app):
@mock.patch('passerelle.utils.Request.post')
def test_read_child_not_found(mocked_post, mocked_get, con, app):
mocked_get.return_value = FAMILY_SERVICE_WSDL
mocked_post.side_effect = [READ_FAMILY, READ_CATEGORIES, READ_SITUATIONS, READ_CIVILITIES, READ_QUALITIES]
mocked_post.side_effect = [
READ_FAMILY,
READ_CATEGORIES,
READ_SITUATIONS,
READ_CIVILITIES,
READ_QUALITIES,
READ_CSP,
]
url = get_endpoint('read-child')
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -777,9 +895,9 @@ def test_is_rl_exists(mocked_post, mocked_get, post_response, result, con, app):
url = get_endpoint('is-rl-exists')
params = {
'firstname': 'Damien',
'lastname': 'Costanze',
'dateBirth': '1980-10-07',
'firstname': 'Jhon',
'lastname': 'Doe',
'dateBirth': '1938-07-26',
}
resp = app.post_json(url, params=params)
assert resp.json['err'] == 0
@ -790,9 +908,9 @@ def test_is_rl_exists_schema_error(con, app):
url = get_endpoint('is-rl-exists')
params = {
'firstname': 'Damien',
'lastname': 'Costanze',
'dateBirth': '1980-10-07 more text',
'firstname': 'Jhon',
'lastname': 'Doe',
'dateBirth': '1938-07-26 more text',
}
resp = app.post_json(url, params=params, status=400)
assert resp.json['err'] == 1
@ -814,9 +932,9 @@ def test_is_child_exists(mocked_post, mocked_get, post_response, result, con, ap
url = get_endpoint('is-child-exists')
params = {
'firstname': 'Cassandra',
'lastname': 'Costanze',
'dateBirth': '2021-06-22',
'firstname': 'Doe',
'lastname': 'Jhonny allen',
'dateBirth': '1942-11-27',
}
resp = app.post_json(url, params=params)
assert resp.json['err'] == 0
@ -1035,7 +1153,7 @@ def test_create_person(mocked_post, mocked_get, con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1054,7 +1172,7 @@ def test_create_person_wrong_parameter(con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1072,7 +1190,7 @@ def test_create_person_not_linked_error(con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1094,7 +1212,7 @@ def test_update_person(mocked_post, mocked_get, con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1113,7 +1231,7 @@ def test_update_person_wrong_parameter(con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1131,7 +1249,7 @@ def test_update_person_not_linked_error(con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1153,13 +1271,12 @@ def test_update_person_not_found(mocked_post, mocked_get, con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
'contact/mail': None,
}
Link.objects.create(resource=con, family_id='1312', name_id='local')
resp = app.post_json(url + '?NameID=local&person_id=000000&kind=emergency', params=params)
assert resp.json['err'] == 'not-found'
@ -1176,7 +1293,7 @@ def test_delete_person(mocked_post, mocked_get, con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1195,7 +1312,7 @@ def test_delete_person_wrong_parameter(con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1213,7 +1330,7 @@ def test_delete_person_not_linked_error(con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',
@ -1235,7 +1352,7 @@ def test_delete_person_not_found(mocked_post, mocked_get, con, app):
'civility': None,
'firstname': 'Mathias',
'lastname': 'Cassel',
'quality': 'PERE',
'quality': 'O',
'dateBirth': '1972-01-01',
'contact/phone': None,
'contact/mobile': '0623456789',