toulouse_parsifal: unset default date on emergency person (#69047)

This commit is contained in:
Nicolas Roche 2022-09-13 15:22:07 +02:00
parent 110e638a65
commit bfa272e3d6
3 changed files with 2 additions and 3 deletions

View File

@ -125,7 +125,6 @@ class ToulouseMaelis(BaseResource, HTTPResource):
# make emergencyPersonList keys egal to authorizedPersonList
for person in data['emergencyPersonList']:
person['numPerson'] = person['num']
person['dateBirth'] = '1970-01-01' # I need a date
del person['num']
del person['id']
return data

View File

@ -19,7 +19,7 @@
<civility>MME</civility>
<firstname>KENY</firstname>
<lastname>ARKANA</lastname>
<dateBirth>1970-01-01</dateBirth>
<dateBirth>1982-12-20T00:00:00+01:00</dateBirth>
<quality>T</quality>
<contact>
<phone>0123456789</phone>

View File

@ -671,7 +671,7 @@ def test_read_family(mocked_post, mocked_get, con, app):
assert resp.json['data']['emergencyPersonList'][0] == {
'firstname': 'KENY',
'lastname': 'ARKANA',
'dateBirth': '1970-01-01',
'dateBirth': '1982-12-20T00:00:00+01:00',
'quality': 'T',
'civility': 'MME',
'contact': {'phone': '0123456789', 'mobile': None, 'mail': 'pueblo@example.org'},