atal: use comma in coordinates (#35180)
This commit is contained in:
parent
4b7907fc76
commit
1e52262f06
|
@ -152,6 +152,10 @@ 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
|
||||
)
|
||||
|
|
|
@ -104,7 +104,7 @@ def test_get_types_equipement(app, connector, monkeypatch):
|
|||
assert call_params['method'] == 'getTypesEquipement'
|
||||
|
||||
|
||||
def test_insert_demande_complet_by_type(app, connector, monkeypatch):
|
||||
def test_insert_action_comment(app, connector, monkeypatch):
|
||||
mock_soap_call = mock_atal_soap_call(monkeypatch, return_value='DIT19050001')
|
||||
params = {
|
||||
'numero_demande': 'DIT19050001',
|
||||
|
@ -122,6 +122,25 @@ def test_insert_demande_complet_by_type(app, connector, monkeypatch):
|
|||
assert call_params['commentaire'] == 'aaa'
|
||||
|
||||
|
||||
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'
|
||||
}
|
||||
response = app.post_json('/atal/slug-atal/insert-demande-complet-by-type', params=params)
|
||||
assert response.json == {
|
||||
'err': 0,
|
||||
'data': {'demande_number': 'DIT19050001'}
|
||||
}
|
||||
call_params = mock_soap_call.call_args.kwargs
|
||||
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'
|
||||
|
||||
|
||||
def test_upload(app, connector, monkeypatch):
|
||||
mock_soap_call = mock_atal_soap_call(monkeypatch, return_value=None)
|
||||
base64_str = 'eyJsYXN0X2NoZWNrIjoiMjAxOS0wNC0xMFQxMjowODoyOVoiL' + \
|
||||
|
|
Loading…
Reference in New Issue