diff --git a/passerelle/contrib/toulouse_maelis/models.py b/passerelle/contrib/toulouse_maelis/models.py index 42206cec..0f417c96 100644 --- a/passerelle/contrib/toulouse_maelis/models.py +++ b/passerelle/contrib/toulouse_maelis/models.py @@ -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}) diff --git a/passerelle/contrib/toulouse_maelis/schemas.py b/passerelle/contrib/toulouse_maelis/schemas.py index 51eec7e8..98e25be8 100644 --- a/passerelle/contrib/toulouse_maelis/schemas.py +++ b/passerelle/contrib/toulouse_maelis/schemas.py @@ -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'] diff --git a/tests/data/toulouse_maelis/Q_create_family.xml b/tests/data/toulouse_maelis/Q_create_family.xml index f9f02ccc..e856fdb9 100644 --- a/tests/data/toulouse_maelis/Q_create_family.xml +++ b/tests/data/toulouse_maelis/Q_create_family.xml @@ -17,7 +17,11 @@ Doe AU M. - 1938-07-26 + + 1938-07-26 + Rabbat + 99350 + B Chateau @@ -35,7 +39,12 @@ Robert Zimmerman M - 1941-05-24 + + 1941-05-24 + Saint-louis + 91122 + 99100 + RSV diff --git a/tests/data/toulouse_maelis/Q_create_rl1.xml b/tests/data/toulouse_maelis/Q_create_rl1.xml index 03e9e05f..fcc47161 100644 --- a/tests/data/toulouse_maelis/Q_create_rl1.xml +++ b/tests/data/toulouse_maelis/Q_create_rl1.xml @@ -17,7 +17,9 @@ Doe AU M. - 1938-07-26 + + 1938-07-26 + Chateau Paris diff --git a/tests/data/toulouse_maelis/Q_create_rl2.xml b/tests/data/toulouse_maelis/Q_create_rl2.xml index 05913e9c..63a71405 100644 --- a/tests/data/toulouse_maelis/Q_create_rl2.xml +++ b/tests/data/toulouse_maelis/Q_create_rl2.xml @@ -19,7 +19,9 @@ DOE MERE MME - 1940-06-22 + + 1940-06-22 + 170 Chateau d'eau diff --git a/tests/data/toulouse_maelis/Q_update_family.xml b/tests/data/toulouse_maelis/Q_update_family.xml index a9245f3e..2239a3c4 100644 --- a/tests/data/toulouse_maelis/Q_update_family.xml +++ b/tests/data/toulouse_maelis/Q_update_family.xml @@ -18,7 +18,12 @@ Doe AU M. - 1938-07-26 + + 1938-07-26 + Rabbat + + 99350 + B Chateau diff --git a/tests/data/toulouse_maelis/Q_update_rl1.xml b/tests/data/toulouse_maelis/Q_update_rl1.xml index 4e356430..77b2f6f9 100644 --- a/tests/data/toulouse_maelis/Q_update_rl1.xml +++ b/tests/data/toulouse_maelis/Q_update_rl1.xml @@ -21,7 +21,9 @@ Doe PERE M. - 1943-06-15 + + 1943-06-15 + 170 Chateau d'eau diff --git a/tests/data/toulouse_maelis/Q_update_rl2.xml b/tests/data/toulouse_maelis/Q_update_rl2.xml index 5846fc21..02ad1d47 100644 --- a/tests/data/toulouse_maelis/Q_update_rl2.xml +++ b/tests/data/toulouse_maelis/Q_update_rl2.xml @@ -20,7 +20,9 @@ DOE MERE MME - 1940-06-22 + + 1940-06-22 + 170 Chateau d'eau diff --git a/tests/data/toulouse_maelis/R_read_family.xml b/tests/data/toulouse_maelis/R_read_family.xml index 669d20c9..73887dd0 100644 --- a/tests/data/toulouse_maelis/R_read_family.xml +++ b/tests/data/toulouse_maelis/R_read_family.xml @@ -13,7 +13,11 @@ JHON PERE M. - 1938-07-26T00:00:00+01:00 + + 1938-07-26T00:00:00+01:00 + Rabbat + 99350 + 170 @@ -39,7 +43,11 @@ JANE MERE MME - 1940-06-22T00:00:00+02:00 + + 1940-06-22T00:00:00+02:00 + Bardot + 99351 + 170 @@ -85,6 +93,9 @@ F 1943-01-19T00:00:00+01:00 + Saint-louis + 91122 + 99100 RSV true diff --git a/tests/data/toulouse_maelis/R_read_family_relax.xml b/tests/data/toulouse_maelis/R_read_family_relax.xml index 91102dfa..dda74651 100644 --- a/tests/data/toulouse_maelis/R_read_family_relax.xml +++ b/tests/data/toulouse_maelis/R_read_family_relax.xml @@ -13,7 +13,11 @@ JHON PERE M. - 1938-07-26T00:00:00+01:00 + + 1938-07-26T00:00:00+01:00 + Rabbat + 99350 + 170 @@ -38,7 +42,11 @@ DOE JANE MME - 1940-06-22T00:00:00+02:00 + + 1940-06-22T00:00:00+02:00 + Bardot + 99351 + 170 @@ -84,6 +92,9 @@ F 1943-01-19T00:00:00+01:00 + Saint-louis + 91122 + 99100 RSV true diff --git a/tests/data/toulouse_maelis/R_read_family_reordered.xml b/tests/data/toulouse_maelis/R_read_family_reordered.xml index ddcd4211..4c8b514f 100644 --- a/tests/data/toulouse_maelis/R_read_family_reordered.xml +++ b/tests/data/toulouse_maelis/R_read_family_reordered.xml @@ -13,7 +13,11 @@ JHON PERE M. - 1938-07-26T00:00:00+01:00 + + 1938-07-26T00:00:00+01:00 + Rabbat + 99350 + 170 @@ -39,7 +43,11 @@ JANE MERE MME - 1940-06-22T00:00:00+02:00 + + 1940-06-22T00:00:00+02:00 + Bardot + 99351 + 170 @@ -85,6 +93,9 @@ F 1943-01-19T00:00:00+01:00 + Saint-louis + 91122 + 99100 RSV true diff --git a/tests/data/toulouse_maelis/R_read_family_with_only_rl1.xml b/tests/data/toulouse_maelis/R_read_family_with_only_rl1.xml index 1d0d1db3..a9308816 100644 --- a/tests/data/toulouse_maelis/R_read_family_with_only_rl1.xml +++ b/tests/data/toulouse_maelis/R_read_family_with_only_rl1.xml @@ -13,7 +13,11 @@ JHON PERE M. - 1938-07-26T00:00:00+01:00 + + 1938-07-26T00:00:00+01:00 + Rabbat + 99350 + 170 diff --git a/tests/data/toulouse_maelis/R_update_family.xml b/tests/data/toulouse_maelis/R_update_family.xml index 7402b6c5..0d95677c 100644 --- a/tests/data/toulouse_maelis/R_update_family.xml +++ b/tests/data/toulouse_maelis/R_update_family.xml @@ -12,7 +12,11 @@ JHON AU MR - 1938-07-26T00:00:00+01:00 + + 1938-07-26T00:00:00+01:00 + Rabbat + 99350 + 0 @@ -32,7 +36,11 @@ JANNETTE MERE MR - 1940-06-22T00:00:00+02:00 + + 1940-06-22T00:00:00+02:00 + Bardot + 99351 + 0 diff --git a/tests/test_toulouse_maelis.py b/tests/test_toulouse_maelis.py index cd8f8d42..ba49bae6 100644 --- a/tests/test_toulouse_maelis.py +++ b/tests/test_toulouse_maelis.py @@ -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')