atal_rest: change a parameter name (#87489)
gitea/passerelle/pipeline/head Build queued... Details

This commit is contained in:
Emmanuel Cazenave 2024-02-26 18:07:38 +01:00
parent ea1a5a87d6
commit 1570ba1f3f
2 changed files with 5 additions and 3 deletions

View File

@ -118,7 +118,7 @@ WORKSREQUESTS_SCHEMA = {
{'type': 'string'},
]
},
'localisation': {'type': 'string'},
'localization': {'type': 'string'},
'longitude': {
'oneOf': [
{'type': 'number'},
@ -277,7 +277,7 @@ class AtalREST(BaseResource, HTTPResource):
'desired_date': '2023-06-28',
'keywords': 'foo bar',
'latitude': '0',
'localisation': 'somewhere',
'localization': 'somewhere',
'longitude': '0',
'object': 'some object',
'operator': 'some operator',
@ -371,7 +371,7 @@ class AtalREST(BaseResource, HTTPResource):
'comments': 'Comments',
'description': 'Description',
'keywords': 'Keywords',
'localisation': 'Localisation',
'localization': 'Localization',
'object': 'Object',
'operator': 'Operator',
}

View File

@ -53,6 +53,7 @@ def test_worksrequest(app, connector, geoloc):
'recipient_id': '56',
'requester_id': '12',
'requesting_department_id': '17',
'localization': 'foo',
}
params.update(geoloc)
resp = app.post_json('/atal-rest/test/worksrequests', params=params)
@ -62,6 +63,7 @@ def test_worksrequest(app, connector, geoloc):
assert json_resp['data']['RequestState'] == 0
assert json_resp['data']['RequestStateLabel'] == 'En attente'
request_data = json.loads(rsps.calls[0].request.body)
assert request_data['Localization'] == 'foo'
assert request_data['Latitude'] == 47.257117
assert request_data['Longitude'] == -0.07624