toulouse-maelis: [functests] update only doctor (#2770)
gitea/passerelle/pipeline/head This commit looks good
Details
gitea/passerelle/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4ccaad6d35
commit
40287181cc
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"familyDoctor": {
|
||||
"name": "HIBBERT",
|
||||
"phone": "0656785678",
|
||||
"address": {
|
||||
"street1": "General Hospital",
|
||||
"zipcode": "90701",
|
||||
"town": "Springfield"
|
||||
}
|
||||
},
|
||||
"allergy1": null,
|
||||
"allergy2": null,
|
||||
"comment1": null,
|
||||
"comment2": null,
|
||||
"observ1": null,
|
||||
"observ2": null,
|
||||
"isAuthHospital": true,
|
||||
"hospital": "Springfield General Hospital",
|
||||
"vaccinList": [
|
||||
{
|
||||
"code": "1",
|
||||
"libelle": "TETANOS",
|
||||
"vaccinationDate": "2022-02-22T00:00:00+01:00"
|
||||
},
|
||||
{
|
||||
"code": "8",
|
||||
"libelle": "DTPOLIO",
|
||||
"vaccinationDate": "2011-01-11T00:00:00+01:00"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -618,6 +618,24 @@ def test_update_child_medical_record(conn, update_data):
|
|||
update_data['bart_num'],
|
||||
)
|
||||
|
||||
# update only doctor
|
||||
# #2720: allergies comments, and observations are erased
|
||||
payload = {
|
||||
'familyDoctor': {
|
||||
'name': 'Hibbert',
|
||||
'phone': '0656785678',
|
||||
'address': {
|
||||
'street1': 'General Hospital',
|
||||
'zipcode': '90701',
|
||||
'town': 'Springfield',
|
||||
},
|
||||
},
|
||||
}
|
||||
resp = requests.post(url, json=payload)
|
||||
resp.raise_for_status()
|
||||
assert resp.json()['err'] == 0
|
||||
assert diff_child(conn, update_data['name_id'], 0, 'test_update_child_doctor.json', key='medicalRecord')
|
||||
|
||||
# reset medical record
|
||||
payload = FAMILY_RESET_PAYLOAD['childList'][0]['medicalRecord']
|
||||
resp = requests.post(url, json=payload)
|
||||
|
|
Loading…
Reference in New Issue