diff --git a/passerelle/contrib/toulouse_maelis/schemas.py b/passerelle/contrib/toulouse_maelis/schemas.py index 98e25be8..c677dd57 100644 --- a/passerelle/contrib/toulouse_maelis/schemas.py +++ b/passerelle/contrib/toulouse_maelis/schemas.py @@ -102,6 +102,10 @@ ID_PROPERTIES = { 'description': 'Nom', 'type': 'string', }, + 'maidenName': { + 'description': "Nom de jeune fille ", + 'oneOf': [{'type': 'string'}, {'type': 'null'}], + }, 'birth': BIRTH_SCHEMA, } diff --git a/tests/data/toulouse_maelis/Q_create_rl2.xml b/tests/data/toulouse_maelis/Q_create_rl2.xml index 63a71405..076ce6a2 100644 --- a/tests/data/toulouse_maelis/Q_create_rl2.xml +++ b/tests/data/toulouse_maelis/Q_create_rl2.xml @@ -17,6 +17,7 @@ JANE DOE + Smith MERE MME diff --git a/tests/data/toulouse_maelis/Q_update_rl2.xml b/tests/data/toulouse_maelis/Q_update_rl2.xml index 02ad1d47..f75e5a94 100644 --- a/tests/data/toulouse_maelis/Q_update_rl2.xml +++ b/tests/data/toulouse_maelis/Q_update_rl2.xml @@ -18,6 +18,7 @@ 613879 JANE DOE + Smith MERE MME diff --git a/tests/data/toulouse_maelis/R_read_family.xml b/tests/data/toulouse_maelis/R_read_family.xml index 73887dd0..cc9c3c68 100644 --- a/tests/data/toulouse_maelis/R_read_family.xml +++ b/tests/data/toulouse_maelis/R_read_family.xml @@ -41,6 +41,7 @@ 613879 DOE JANE + SMITH MERE MME diff --git a/tests/test_toulouse_maelis.py b/tests/test_toulouse_maelis.py index ba49bae6..f2da53a5 100644 --- a/tests/test_toulouse_maelis.py +++ b/tests/test_toulouse_maelis.py @@ -770,7 +770,7 @@ def test_read_rl2(mocked_post, mocked_get, con, app): 'num': '613879', 'lastname': 'DOE', 'firstname': 'JANE', - 'maidenName': None, + 'maidenName': 'SMITH', 'quality': 'MERE', 'civility': 'MME', 'birth': { @@ -1624,6 +1624,7 @@ def test_create_rl2(mocked_post, mocked_get, con, app): 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'MERE', 'birth/dateBirth': '1940-06-22', 'adresse/num': '170', @@ -1645,6 +1646,7 @@ def test_create_rl2_not_linked_error(con, app): 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'MERE', 'birth/dateBirth': '1940-06-22', 'adresse/num': '170', @@ -1668,6 +1670,7 @@ def test_create_rl2_connection_error(mocked_post, mocked_get, con, app): 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'MERE', 'birth/dateBirth': '1940-06-22', 'adresse/num': '170', @@ -1692,6 +1695,7 @@ def test_create_rl2_already_exists_error(mocked_post, mocked_get, con, app): 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'MERE', 'birth/dateBirth': '1940-06-22', 'adresse/num': '170', @@ -1716,6 +1720,7 @@ def test_create_rl2_wrong_referential_key_error(mocked_post, mocked_get, con, ap 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'plop', 'birth/dateBirth': '1940-06-22', 'adresse/num': '170', @@ -1740,6 +1745,7 @@ def test_update_rl2(mocked_post, mocked_get, con, app): 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'MERE', 'birth/dateBirth': '1940-06-22', } @@ -1757,6 +1763,7 @@ def test_update_rl2_not_linked_error(con, app): 'firstname': 'JANE', 'lastname': 'DOE', 'quality': 'MERE', + 'maidenName': 'Smith', 'birth/dateBirth': '1940-06-22', } @@ -1775,6 +1782,7 @@ def test_update_rl2_connection_error(mocked_post, mocked_get, con, app): 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'MERE', 'birth/dateBirth': '1940-06-22', } @@ -1795,6 +1803,7 @@ def test_update_rl2_not_exists_error(mocked_post, mocked_get, con, app): 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'MERE', 'birth/dateBirth': '1940-06-22', } @@ -1815,6 +1824,7 @@ def test_update_rl2_wrong_referential_key_error(mocked_post, mocked_get, con, ap 'civility': 'MME', 'firstname': 'JANE', 'lastname': 'DOE', + 'maidenName': 'Smith', 'quality': 'plop', 'birth/dateBirth': '1940-06-22', }