toulouse-maelis: manage sex field on persons (#69926)
This commit is contained in:
parent
5be860306f
commit
e4917337e4
|
@ -197,6 +197,7 @@ class ToulouseMaelis(BaseResource, HTTPResource):
|
|||
def add_text_value_to_person(self, data):
|
||||
self.add_text_value('Civility', data, ['civility'])
|
||||
self.add_text_value('Quality', data, ['quality'])
|
||||
self.add_text_value('Sex', data, ['sexe'])
|
||||
|
||||
def add_text_value_to_rl(self, data):
|
||||
self.add_text_value('Civility', data, ['civility'])
|
||||
|
|
|
@ -557,6 +557,10 @@ FAMILYPERSON_SCHEMA = {
|
|||
'description': 'Qualité',
|
||||
'oneOf': [{'type': 'null'}, {'type': 'string'}],
|
||||
},
|
||||
'sexe': {
|
||||
'description': 'Sexe',
|
||||
'oneOf': [{'type': 'null'}, {'type': 'string'}],
|
||||
},
|
||||
'contact': CONTACTLIGHT_SCHEMA,
|
||||
},
|
||||
'unflatten': True,
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<lastname>Ross</lastname>
|
||||
<firstname>Diana</firstname>
|
||||
<dateBirth>1944-03-26</dateBirth>
|
||||
<sexe>F</sexe>
|
||||
<contact>
|
||||
<phone>0199999999</phone>
|
||||
<mobile>0723456789</mobile>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
<firstname>Mathias</firstname>
|
||||
<lastname>Cassel</lastname>
|
||||
<dateBirth>1972-01-01</dateBirth>
|
||||
<sexe>M</sexe>
|
||||
<quality>O</quality>
|
||||
<contact>
|
||||
<phone/>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<lastname>Bent</lastname>
|
||||
<firstname>Angelo</firstname>
|
||||
<dateBirth>1985-06-22</dateBirth>
|
||||
<sexe>M</sexe>
|
||||
<contact>
|
||||
<phone>0102030405</phone>
|
||||
<mobile/>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<firstname>Mathias</firstname>
|
||||
<lastname>Cassel</lastname>
|
||||
<dateBirth>1972-01-01</dateBirth>
|
||||
<sexe>M</sexe>
|
||||
<quality>O</quality>
|
||||
<contact>
|
||||
<phone/>
|
||||
|
|
|
@ -1669,6 +1669,7 @@ def test_create_person(mocked_post, mocked_get, con, app):
|
|||
'firstname': 'Mathias',
|
||||
'lastname': 'Cassel',
|
||||
'quality': 'O',
|
||||
'sexe': 'M',
|
||||
'dateBirth': '1972-01-01',
|
||||
'contact/phone': None,
|
||||
'contact/mobile': '0623456789',
|
||||
|
@ -1688,6 +1689,7 @@ def test_create_person_not_linked_error(con, app):
|
|||
'firstname': 'Mathias',
|
||||
'lastname': 'Cassel',
|
||||
'quality': 'O',
|
||||
'sexe': 'M',
|
||||
'dateBirth': '1972-01-01',
|
||||
'contact/phone': None,
|
||||
'contact/mobile': '0623456789',
|
||||
|
@ -1710,6 +1712,7 @@ def test_update_person(mocked_post, mocked_get, con, app):
|
|||
'firstname': 'Mathias',
|
||||
'lastname': 'Cassel',
|
||||
'quality': 'O',
|
||||
'sexe': 'M',
|
||||
'dateBirth': '1972-01-01',
|
||||
'contact/phone': None,
|
||||
'contact/mobile': '0623456789',
|
||||
|
@ -1729,6 +1732,7 @@ def test_update_person_not_linked_error(con, app):
|
|||
'firstname': 'Mathias',
|
||||
'lastname': 'Cassel',
|
||||
'quality': 'O',
|
||||
'sexe': 'M',
|
||||
'dateBirth': '1972-01-01',
|
||||
'contact/phone': None,
|
||||
'contact/mobile': '0623456789',
|
||||
|
@ -1751,6 +1755,7 @@ def test_update_person_not_found(mocked_post, mocked_get, con, app):
|
|||
'firstname': 'Mathias',
|
||||
'lastname': 'Cassel',
|
||||
'quality': 'O',
|
||||
'sexe': 'M',
|
||||
'dateBirth': '1972-01-01',
|
||||
'contact/phone': None,
|
||||
'contact/mobile': '0623456789',
|
||||
|
@ -1806,6 +1811,7 @@ def test_create_child_person(mocked_post, mocked_get, con, app):
|
|||
'personInfo/civility': 'MME',
|
||||
'personInfo/firstname': 'Diana',
|
||||
'personInfo/lastname': 'Ross',
|
||||
'personInfo/sexe': 'F',
|
||||
'personInfo/dateBirth': '1944-03-26',
|
||||
'personInfo/contact/phone': '0199999999',
|
||||
'personInfo/contact/mobile': '0723456789',
|
||||
|
@ -1825,6 +1831,7 @@ def test_create_child_person_not_linked_error(con, app):
|
|||
'personInfo/civility': 'MME',
|
||||
'personInfo/firstname': 'Diana',
|
||||
'personInfo/lastname': 'Ross',
|
||||
'personInfo/sexe': 'F',
|
||||
'personInfo/dateBirth': '1944-03-26',
|
||||
'personInfo/contact/phone': '01999999999',
|
||||
'personInfo/contact/mobile': '0723456789',
|
||||
|
@ -1847,6 +1854,7 @@ def test_create_child_person_no_child_error(mocked_post, mocked_get, con, app):
|
|||
'personInfo/civility': 'MME',
|
||||
'personInfo/firstname': 'Diana',
|
||||
'personInfo/lastname': 'Ross',
|
||||
'personInfo/sexe': 'F',
|
||||
'personInfo/dateBirth': '1944-03-26',
|
||||
'personInfo/contact/phone': '01999999999',
|
||||
'personInfo/contact/mobile': '0723456789',
|
||||
|
@ -1870,6 +1878,7 @@ def test_update_child_person(mocked_post, mocked_get, con, app):
|
|||
'personInfo/civility': 'M.',
|
||||
'personInfo/firstname': 'Angelo',
|
||||
'personInfo/lastname': 'Bent',
|
||||
'personInfo/sexe': 'M',
|
||||
'personInfo/dateBirth': '1985-06-22',
|
||||
'personInfo/contact/phone': '0102030405',
|
||||
'personInfo/contact/mobile': None,
|
||||
|
|
Loading…
Reference in New Issue