toulouse-maelis: manage birth bean on RL (#71641)
gitea-wip/passerelle/pipeline/head Build started... Details
gitea/passerelle/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
Nicolas Roche 2022-11-18 14:09:09 +01:00
parent ba417a2768
commit 8b4db641ba
14 changed files with 198 additions and 81 deletions

View File

@ -476,7 +476,7 @@ class ToulouseMaelis(BaseResource, HTTPResource):
if not (
response['RL1']['firstname'] == post_data['firstname'].upper()
and response['RL1']['lastname'] == post_data['lastname'].upper()
and response['RL1']['dateBirth'].strftime('%Y-%m-%d') == post_data['dateBirth']
and response['RL1']['birth']['dateBirth'].strftime('%Y-%m-%d') == post_data['dateBirth']
):
raise APIError("RL1 does not match '%s' family" % family_id, err_code='not-found')
Link.objects.update_or_create(resource=self, name_id=NameID, defaults={'family_id': family_id})

View File

@ -24,7 +24,7 @@ BOOLEAN_TYPES = [
},
]
ID_PROPERTIES = {
BASIC_ID_PROPERTIES = {
'firstname': {
'description': 'Prénom',
'type': 'string',
@ -54,7 +54,7 @@ LINK_SCHEMA = {
},
'additionalProperties': False,
}
LINK_SCHEMA['properties'].update(ID_PROPERTIES)
LINK_SCHEMA['properties'].update(BASIC_ID_PROPERTIES)
ISEXISTS_SCHEMA = {
'$schema': 'http://json-schema.org/draft-04/schema#',
@ -62,10 +62,49 @@ ISEXISTS_SCHEMA = {
'description': "Recherche d'un responsable légal ou d'un enfant dans Maelis",
'type': 'object',
'required': ['firstname', 'lastname', 'dateBirth'],
'properties': ID_PROPERTIES,
'properties': BASIC_ID_PROPERTIES,
'additionalProperties': False,
}
BIRTH_SCHEMA = {
'$schema': 'http://json-schema.org/draft-04/schema#',
'title': 'Birth info',
'description': "Informations relatives à la naissance",
'type': 'object',
'required': ['dateBirth'],
'properties': {
'dateBirth': {
'description': 'Date de naissance',
'type': 'string',
'pattern': '^[0-9]{4}-[0-9]{2}-[0-9]{2}$',
},
'place': {
'description': 'Lieu de naissance',
'oneOf': [{'type': 'string'}, {'type': 'null'}],
},
'communeCode': {
'description': 'Commune de naissance (depuis référentiel)',
'oneOf': [{'type': 'string'}, {'type': 'null'}],
},
'countryCode': {
'description': 'Pays de naissance (depuis référentiel)',
'oneOf': [{'type': 'string'}, {'type': 'null'}],
},
},
}
ID_PROPERTIES = {
'firstname': {
'description': 'Prénom',
'type': 'string',
},
'lastname': {
'description': 'Nom',
'type': 'string',
},
'birth': BIRTH_SCHEMA,
}
ADDRESS_SCHEMA = {
'$schema': 'http://json-schema.org/draft-04/schema#',
'title': 'Address',
@ -206,7 +245,7 @@ RLINFO_SCHEMA = {
'title': 'RL',
'description': "Informations sur le responsable légal",
'type': 'object',
'required': ['firstname', 'lastname', 'civility', 'quality', 'dateBirth', 'adresse'],
'required': ['firstname', 'lastname', 'civility', 'quality', 'birth', 'adresse'],
'properties': {
'civility': {
'description': 'civilité (depuis référentiel)',
@ -223,29 +262,11 @@ RLINFO_SCHEMA = {
'profession': {'oneOf': [PROFESSION_SCHEMA, {'type': 'null'}]},
'CAFInfo': {'oneOf': [CAFINFO_SCHEMA, {'type': 'null'}]},
},
'unflatten': True,
'additionalProperties': False,
}
RLINFO_SCHEMA['properties'].update(ID_PROPERTIES)
CHILDBIRTH_SCHEMA = {
'$schema': 'http://json-schema.org/draft-04/schema#',
'title': 'Child birth',
'description': "Informations sur la naissance d'un enfant",
'type': 'object',
'required': ['dateBirth'],
'properties': {
'dateBirth': {
'description': 'Date de naissance',
'type': 'string',
'pattern': '^[0-9]{4}-[0-9]{2}-[0-9]{2}$',
},
'place': {
'description': 'Lieu de naissance',
'oneOf': [{'type': 'string'}, {'type': 'null'}],
},
},
}
DOCTORADDRESS_SCHEMA = {
'$schema': 'http://json-schema.org/draft-04/schema#',
'title': 'Doctor address',
@ -369,18 +390,14 @@ CHILD_SCHEMA = {
'title': 'Child',
'description': "Informations sur la création d'un enfant",
'type': 'object',
'required': ['sexe', 'firstname', 'lastname'],
'oneOf': [
{'required': ['dateBirth']}, # createFamily
{'required': ['birth']}, # updateFamily
],
'required': ['sexe', 'firstname', 'lastname', 'birth'],
'properties': {
'sexe': {
'description': 'Sexe (depuis référentiel)',
'type': 'string',
'pattern': '.+',
},
'birth': CHILDBIRTH_SCHEMA,
'birth': BIRTH_SCHEMA,
'dietcode': {
'description': 'Code de régime alimentaire (depuis référentiel)',
'oneOf': [{'type': 'string'}, {'type': 'null'}],
@ -446,7 +463,7 @@ FAMILYPERSON_SCHEMA = {
'unflatten': True,
'additionalProperties': False,
}
FAMILYPERSON_SCHEMA['properties'].update(ID_PROPERTIES)
FAMILYPERSON_SCHEMA['properties'].update(BASIC_ID_PROPERTIES)
AUTHORIZEDPERSON_SCHEMA = {
'$schema': 'http://json-schema.org/draft-04/schema#',
@ -540,7 +557,7 @@ del CREATE_RL1_SCHEMA['properties']['rl1']['properties']['profession']
del CREATE_RL1_SCHEMA['properties']['rl1']['properties']['CAFInfo']
UPDATE_RL1_SCHEMA = copy.deepcopy(RLINFO_SCHEMA)
UPDATE_RL1_SCHEMA['required'] = ['firstname', 'lastname', 'civility', 'quality', 'dateBirth']
UPDATE_RL1_SCHEMA['required'] = ['firstname', 'lastname', 'civility', 'quality', 'birth']
del UPDATE_RL1_SCHEMA['properties']['adresse']
del UPDATE_RL1_SCHEMA['properties']['contact']
del UPDATE_RL1_SCHEMA['properties']['profession']

View File

@ -17,7 +17,11 @@
<lastname>Doe</lastname>
<quality>AU</quality>
<civility>M.</civility>
<dateBirth>1938-07-26</dateBirth>
<birth>
<dateBirth>1938-07-26</dateBirth>
<place>Rabbat</place>
<countryCode>99350</countryCode>
</birth>
<adresse>
<numComp>B</numComp>
<street1>Chateau</street1>
@ -35,7 +39,12 @@
<firstname>Robert</firstname>
<lastname>Zimmerman</lastname>
<sexe>M</sexe>
<dateBirth>1941-05-24</dateBirth>
<birth>
<dateBirth>1941-05-24</dateBirth>
<place>Saint-louis</place>
<communeCode>91122</communeCode>
<countryCode>99100</countryCode>
</birth>
<dietcode>RSV</dietcode>
<medicalRecord>
<vaccinList>

View File

@ -17,7 +17,9 @@
<lastname>Doe</lastname>
<quality>AU</quality>
<civility>M.</civility>
<dateBirth>1938-07-26</dateBirth>
<birth>
<dateBirth>1938-07-26</dateBirth>
</birth>
<adresse>
<street1>Chateau</street1>
<town>Paris</town>

View File

@ -19,7 +19,9 @@
<lastname>DOE</lastname>
<quality>MERE</quality>
<civility>MME</civility>
<dateBirth>1940-06-22</dateBirth>
<birth>
<dateBirth>1940-06-22</dateBirth>
</birth>
<adresse>
<num>170</num>
<street1>Chateau d'eau</street1>

View File

@ -18,7 +18,12 @@
<lastname>Doe</lastname>
<quality>AU</quality>
<civility>M.</civility>
<dateBirth>1938-07-26</dateBirth>
<birth>
<dateBirth>1938-07-26</dateBirth>
<place>Rabbat</place>
<communeCode/>
<countryCode>99350</countryCode>
</birth>
<adresse>
<numComp>B</numComp>
<street1>Chateau</street1>

View File

@ -21,7 +21,9 @@
<lastname>Doe</lastname>
<quality>PERE</quality>
<civility>M.</civility>
<dateBirth>1943-06-15</dateBirth>
<birth>
<dateBirth>1943-06-15</dateBirth>
</birth>
<adresse>
<num>170</num>
<street1>Chateau d'eau</street1>

View File

@ -20,7 +20,9 @@
<lastname>DOE</lastname>
<quality>MERE</quality>
<civility>MME</civility>
<dateBirth>1940-06-22</dateBirth>
<birth>
<dateBirth>1940-06-22</dateBirth>
</birth>
<adresse>
<num>170</num>
<street1>Chateau d'eau</street1>

View File

@ -13,7 +13,11 @@
<firstname>JHON</firstname>
<quality>PERE</quality>
<civility>M.</civility>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<birth>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<place>Rabbat</place>
<countryCode>99350</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>
@ -39,7 +43,11 @@
<firstname>JANE</firstname>
<quality>MERE</quality>
<civility>MME</civility>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<birth>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<place>Bardot</place>
<countryCode>99351</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>
@ -85,6 +93,9 @@
<sexe>F</sexe>
<birth>
<dateBirth>1943-01-19T00:00:00+01:00</dateBirth>
<place>Saint-louis</place>
<communeCode>91122</communeCode>
<countryCode>99100</countryCode>
</birth>
<dietcode>RSV</dietcode>
<bPhoto>true</bPhoto>

View File

@ -13,7 +13,11 @@
<firstname>JHON</firstname>
<quality>PERE</quality>
<civility>M.</civility>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<birth>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<place>Rabbat</place>
<countryCode>99350</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>
@ -38,7 +42,11 @@
<lastname>DOE</lastname>
<firstname>JANE</firstname>
<civility>MME</civility>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<birth>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<place>Bardot</place>
<countryCode>99351</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>
@ -84,6 +92,9 @@
<sexe>F</sexe>
<birth>
<dateBirth>1943-01-19T00:00:00+01:00</dateBirth>
<place>Saint-louis</place>
<communeCode>91122</communeCode>
<countryCode>99100</countryCode>
</birth>
<dietcode>RSV</dietcode>
<bPhoto>true</bPhoto>

View File

@ -13,7 +13,11 @@
<firstname>JHON</firstname>
<quality>PERE</quality>
<civility>M.</civility>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<birth>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<place>Rabbat</place>
<countryCode>99350</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>
@ -39,7 +43,11 @@
<firstname>JANE</firstname>
<quality>MERE</quality>
<civility>MME</civility>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<birth>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<place>Bardot</place>
<countryCode>99351</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>
@ -85,6 +93,9 @@
<sexe>F</sexe>
<birth>
<dateBirth>1943-01-19T00:00:00+01:00</dateBirth>
<place>Saint-louis</place>
<communeCode>91122</communeCode>
<countryCode>99100</countryCode>
</birth>
<dietcode>RSV</dietcode>
<bPhoto>true</bPhoto>

View File

@ -13,7 +13,11 @@
<firstname>JHON</firstname>
<quality>PERE</quality>
<civility>M.</civility>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<birth>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<place>Rabbat</place>
<countryCode>99350</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>170</num>

View File

@ -12,7 +12,11 @@
<firstname>JHON</firstname>
<quality>AU</quality>
<civility>MR</civility>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<birth>
<dateBirth>1938-07-26T00:00:00+01:00</dateBirth>
<place>Rabbat</place>
<countryCode>99350</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>0</num>
@ -32,7 +36,11 @@
<firstname>JANNETTE</firstname>
<quality>MERE</quality>
<civility>MR</civility>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<birth>
<dateBirth>1940-06-22T00:00:00+02:00</dateBirth>
<place>Bardot</place>
<countryCode>99351</countryCode>
</birth>
<adresse>
<idStreet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<num>0</num>

View File

@ -587,7 +587,12 @@ def test_read_family(mocked_post, mocked_get, read_family, con, app):
'maidenName': None,
'quality': 'PERE',
'civility': 'M.',
'dateBirth': '1938-07-26T00:00:00+01:00',
'birth': {
'communeCode': None,
'countryCode': '99350',
'dateBirth': '1938-07-26T00:00:00+01:00',
'place': 'Rabbat',
},
'adresse': {
'idStreet': None,
'num': 170,
@ -622,7 +627,12 @@ def test_read_family(mocked_post, mocked_get, read_family, con, app):
'firstname': 'JANNIS',
'sexe': 'F',
'sexe_text': 'Féminin',
'birth': {'dateBirth': '1943-01-19T00:00:00+01:00', 'place': None},
'birth': {
'dateBirth': '1943-01-19T00:00:00+01:00',
'place': 'Saint-louis',
'communeCode': '91122',
'countryCode': '99100',
},
'dietcode': 'RSV',
'dietcode_text': '3- RÉGIME SANS VIANDE',
'bPhoto': True,
@ -763,7 +773,12 @@ def test_read_rl2(mocked_post, mocked_get, con, app):
'maidenName': None,
'quality': 'MERE',
'civility': 'MME',
'dateBirth': '1940-06-22T00:00:00+02:00',
'birth': {
'communeCode': None,
'countryCode': '99351',
'dateBirth': '1940-06-22T00:00:00+02:00',
'place': 'Bardot',
},
'adresse': {
'idStreet': None,
'num': 170,
@ -1046,7 +1061,10 @@ def test_create_family(mocked_post, mocked_get, con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/communeCode': None,
'rl1/birth/countryCode': '99350',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/birth/place': 'Rabbat',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1056,7 +1074,10 @@ def test_create_family(mocked_post, mocked_get, con, app):
'childList/0/lastname': 'Zimmerman',
'childList/0/firstname': 'Robert',
'childList/0/sexe': 'M',
'childList/0/dateBirth': '1941-05-24',
'childList/0/birth/dateBirth': '1941-05-24',
'childList/0/birth/place': 'Saint-louis',
'childList/0/birth/communeCode': '91122',
'childList/0/birth/countryCode': '99100',
'childList/0/dietcode': 'RSV',
'childList/0/medicalRecord/vaccinList/0/code': 'DTC',
'childList/0/medicalRecord/vaccinList/0/vaccinationDate': '1940-07-26',
@ -1083,7 +1104,7 @@ def test_create_family_empty_referential_key_error(con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1103,7 +1124,7 @@ def test_create_family_already_linked_error(con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1134,7 +1155,7 @@ def test_create_family_maelis_error(mocked_post, mocked_get, con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1167,7 +1188,10 @@ def test_create_family_wrong_referential_key_error(mocked_post, mocked_get, con,
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/communeCode': None,
'rl1/birth/countryCode': '99350',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/birth/place': 'Rabbat',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1177,7 +1201,10 @@ def test_create_family_wrong_referential_key_error(mocked_post, mocked_get, con,
'childList/0/lastname': 'Zimmerman',
'childList/0/firstname': 'Robert',
'childList/0/sexe': 'M',
'childList/0/dateBirth': '1941-05-24',
'childList/0/birth/dateBirth': '1941-05-24',
'childList/0/birth/place': 'Saint-louis',
'childList/0/birth/communeCode': '91122',
'childList/0/birth/countryCode': '99100',
'childList/0/dietcode': 'RSV',
'childList/0/medicalRecord/vaccinList/0/code': 'plop',
'childList/0/medicalRecord/vaccinList/0/vaccinationDate': '1940-07-26',
@ -1215,7 +1242,10 @@ def test_update_family(mocked_post, mocked_get, con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/communeCode': None,
'rl1/birth/countryCode': '99350',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/birth/place': 'Rabbat',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1256,7 +1286,7 @@ def test_update_family_not_linked_error(con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1307,7 +1337,7 @@ def test_update_family_soap_error(mocked_post, mocked_get, con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1342,7 +1372,10 @@ def test_update_family_wrong_referential_key_error(mocked_post, mocked_get, con,
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/communeCode': None,
'rl1/birth/countryCode': '99350',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/birth/place': 'Rabbat',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1394,7 +1427,7 @@ def test_create_rl1(mocked_post, mocked_get, con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1416,7 +1449,7 @@ def test_create_rl1_empty_referential_key_error(con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': '',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1436,7 +1469,7 @@ def test_create_rl1_already_linked_error(con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1461,7 +1494,7 @@ def test_create_rl1_wrong_referential_key_error(mocked_post, mocked_get, con, ap
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/numComp': 'plop',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
@ -1495,7 +1528,7 @@ def test_create_rl1_maelis_error(mocked_post, mocked_get, con, app):
'rl1/firstname': 'Jhon',
'rl1/lastname': 'Doe',
'rl1/quality': 'AU',
'rl1/dateBirth': '1938-07-26',
'rl1/birth/dateBirth': '1938-07-26',
'rl1/adresse/street1': 'Chateau',
'rl1/adresse/town': 'Paris',
'rl1/adresse/zipcode': '75014',
@ -1517,7 +1550,7 @@ def test_update_rl1(mocked_post, mocked_get, con, app):
'firstname': 'Jhonny',
'lastname': 'Doe',
'quality': 'PERE',
'dateBirth': '1943-06-15',
'birth/dateBirth': '1943-06-15',
}
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -1533,7 +1566,7 @@ def test_update_rl1_not_linked_error(con, app):
'firstname': 'Jhonny',
'lastname': 'Doe',
'quality': 'PERE',
'dateBirth': '1943-06-15',
'birth/dateBirth': '1943-06-15',
}
resp = app.post_json(url + '?NameID=local', params=params)
@ -1552,7 +1585,7 @@ def test_update_rl1_connection_error(mocked_post, mocked_get, con, app):
'firstname': 'Jhonny',
'lastname': 'Doe',
'quality': 'PERE',
'dateBirth': '1943-06-15',
'birth/dateBirth': '1943-06-15',
}
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -1572,7 +1605,7 @@ def test_update_rl1_wrong_referential_key_error(mocked_post, mocked_get, con, ap
'firstname': 'Jhonny',
'lastname': 'Doe',
'quality': 'plop',
'dateBirth': '1943-06-15',
'birth/dateBirth': '1943-06-15',
}
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -1592,7 +1625,7 @@ def test_create_rl2(mocked_post, mocked_get, con, app):
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'MERE',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
'adresse/num': '170',
'adresse/street1': "Chateau d'eau",
'adresse/town': 'Paris',
@ -1613,7 +1646,7 @@ def test_create_rl2_not_linked_error(con, app):
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'MERE',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
'adresse/num': '170',
'adresse/street1': "Chateau d'eau",
'adresse/town': 'Paris',
@ -1636,7 +1669,7 @@ def test_create_rl2_connection_error(mocked_post, mocked_get, con, app):
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'MERE',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
'adresse/num': '170',
'adresse/street1': "Chateau d'eau",
'adresse/town': 'Paris',
@ -1660,7 +1693,7 @@ def test_create_rl2_already_exists_error(mocked_post, mocked_get, con, app):
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'MERE',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
'adresse/num': '170',
'adresse/street1': "Chateau d'eau",
'adresse/town': 'Paris',
@ -1684,7 +1717,7 @@ def test_create_rl2_wrong_referential_key_error(mocked_post, mocked_get, con, ap
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'plop',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
'adresse/num': '170',
'adresse/street1': "Chateau d'eau",
'adresse/town': 'Paris',
@ -1708,7 +1741,7 @@ def test_update_rl2(mocked_post, mocked_get, con, app):
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'MERE',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
}
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -1724,7 +1757,7 @@ def test_update_rl2_not_linked_error(con, app):
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'MERE',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
}
resp = app.post_json(url + '?NameID=local', params=params)
@ -1743,7 +1776,7 @@ def test_update_rl2_connection_error(mocked_post, mocked_get, con, app):
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'MERE',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
}
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -1763,7 +1796,7 @@ def test_update_rl2_not_exists_error(mocked_post, mocked_get, con, app):
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'MERE',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
}
Link.objects.create(resource=con, family_id='1312', name_id='local')
@ -1783,7 +1816,7 @@ def test_update_rl2_wrong_referential_key_error(mocked_post, mocked_get, con, ap
'firstname': 'JANE',
'lastname': 'DOE',
'quality': 'plop',
'dateBirth': '1940-06-22',
'birth/dateBirth': '1940-06-22',
}
Link.objects.create(resource=con, family_id='1312', name_id='local')