atal: expects numbers in coordinates (#51015)
This commit is contained in:
parent
c9aa538bdc
commit
aa2fdb1bbf
|
@ -170,10 +170,6 @@ class ATALConnector(BaseResource):
|
|||
if recv in post_data:
|
||||
data[send] = post_data[recv]
|
||||
|
||||
for coord_key in ('coordX', 'coordY'):
|
||||
if coord_key in data:
|
||||
data[coord_key] = data[coord_key].replace(',', '.')
|
||||
|
||||
demande_number = self._soap_call(
|
||||
wsdl='DemandeService', method='insertDemandeCompletByType', **data
|
||||
)
|
||||
|
|
|
@ -105,10 +105,10 @@ INSERT_DEMANDE_COMPLET_BY_TYPE = {
|
|||
'type': 'string',
|
||||
},
|
||||
'coord_x': {
|
||||
'type': 'string',
|
||||
'type': 'number',
|
||||
},
|
||||
'coord_y': {
|
||||
'type': 'string',
|
||||
'type': 'number',
|
||||
},
|
||||
'demande_priorite': {
|
||||
'type': 'string',
|
||||
|
|
|
@ -139,7 +139,7 @@ def test_insert_demande_complet_by_type(app, connector, monkeypatch):
|
|||
mock_soap_call = mock_atal_soap_call(monkeypatch, return_value='DIT19050001')
|
||||
params = {
|
||||
'type_demande': 'VOIRIE',
|
||||
'coord_x': '48,866667', 'coord_y': '2,333333'
|
||||
'coord_x': 48.866667, 'coord_y': 2.333333
|
||||
}
|
||||
response = app.post_json('/atal/slug-atal/insert-demande-complet-by-type', params=params)
|
||||
assert response.json == {
|
||||
|
@ -150,8 +150,8 @@ def test_insert_demande_complet_by_type(app, connector, monkeypatch):
|
|||
assert call_params['wsdl'] == 'DemandeService'
|
||||
assert call_params['method'] == 'insertDemandeCompletByType'
|
||||
assert call_params['typeDemande'] == 'VOIRIE'
|
||||
assert call_params['coordX'] == '48.866667'
|
||||
assert call_params['coordY'] == '2.333333'
|
||||
assert call_params['coordX'] == 48.866667
|
||||
assert call_params['coordY'] == 2.333333
|
||||
|
||||
|
||||
def test_upload(app, connector, monkeypatch):
|
||||
|
|
Loading…
Reference in New Issue