signal_arretes: add support for comment field (#73853)
This commit is contained in:
parent
a9af448b5a
commit
ce01cd554b
|
@ -87,6 +87,7 @@ REQUEST_SCHEMA = {
|
|||
'format': 'date',
|
||||
},
|
||||
'occupation_end_date': {'description': _('Occupation end date'), 'type': 'string', 'format': 'date'},
|
||||
'comment': {'description': _('Comment'), 'type': 'string'},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -218,6 +219,7 @@ class SignalArretes(BaseResource, HTTPResource):
|
|||
'qualite': post_data['declarant_quality'],
|
||||
'SIRET': post_data['declarant_siret'],
|
||||
'numeroDossier': post_data['file_number'],
|
||||
'commentaire': post_data['comment'],
|
||||
'contact': {
|
||||
'civilite': post_data['declarant_civility'],
|
||||
'nom': post_data['declarant_name'],
|
||||
|
|
|
@ -68,6 +68,7 @@ def mock_creation_dodp(url, request):
|
|||
|
||||
assert 'SIRET' not in data or data['SIRET'] == '00000000000000'
|
||||
assert 'numeroDossier' not in data or data['numeroDossier'] == 'reference_dossier'
|
||||
assert 'commentaire' not in data or data['commentaire'] == 'Wubba Lubba Dub Dub'
|
||||
assert 'adresseLigne1' not in contact or contact['adresseLigne1'] == '6 Sesame street'
|
||||
assert 'CP' not in contact or contact['CP'] == '42 42420'
|
||||
assert 'ville' not in contact or contact['ville'] == 'Melun'
|
||||
|
@ -211,6 +212,7 @@ REQUIRED_PARAMETERS = {
|
|||
'occupation_type': 'Base de vie',
|
||||
'occupation_start_date': '02/06/2022',
|
||||
'occupation_end_date': '03/06/2022',
|
||||
'comment': '',
|
||||
}
|
||||
|
||||
|
||||
|
@ -229,6 +231,7 @@ def test_create_request(app, connector, mock_signal_arretes):
|
|||
'declarant_city': 'Melun',
|
||||
'declarant_phone': '0636656565',
|
||||
'occupation_lane': 'Sesame Street',
|
||||
'comment': 'Wubba Lubba Dub Dub',
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue