toulouse-maelis: [tests] return more nurseries on get_nursery_geojson (#81538)

This commit is contained in:
Nicolas Roche 2023-09-23 20:56:10 +02:00 committed by Nicolas Roche
parent 4bd7032998
commit bc62bdc3fd
2 changed files with 75 additions and 62 deletions

View File

@ -23,6 +23,8 @@
<address>
<num>31</num><street1>RUE ROQUELAINE</street1><zipcode>31000</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>
@ -46,6 +48,8 @@
<address>
<num>1</num><street1>IMP DES HERONS</street1><zipcode>31400</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>
@ -66,6 +70,8 @@
<address>
<num>12</num><street1>CHE DES PRADETTES</street1><zipcode>31100</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>
@ -89,6 +95,8 @@
<address>
<num>48</num><street1>RUE DE LA REPUBLIQUE</street1><zipcode>31300</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>
@ -108,6 +116,8 @@
<address>
<num>1</num><street1>RUE DE SEBASTOPOL</street1><zipcode>31000</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>
@ -124,6 +134,8 @@
<address>
<num>1</num><street1>RUE DE SEBASTOPOL</street1><zipcode>31000</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>
@ -143,6 +155,8 @@
<address>
<num>1</num><street1>RUE DE SEBASTOPOL</street1><zipcode>31000</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>
@ -188,6 +202,8 @@
<address>
<num>5</num><street1>PL STEPHANE HESSEL</street1><zipcode>31200</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>
@ -208,6 +224,8 @@
<address>
<num>95</num><street1>RUE ERNEST RENAN</street1><zipcode>31200</zipcode><town>TOULOUSE</town>
</address>
<latitude>43.606099</latitude>
<longitude>1.430282</longitude>
</place>
</nurseryList>
<nurseryList>

View File

@ -10252,69 +10252,64 @@ def test_get_nursery_geojson(con, app):
}
resp = app.get(url, params=params)
assert resp.json['err'] == 0
assert len(resp.json['features']) == 1
assert resp.json == {
'type': 'FeatureCollection',
'features': [
{
'type': 'Feature',
'geometry': {'coordinates': [1.430282, 43.606099], 'type': 'Point'},
'properties': {
'id': 'M10000000001:M10053212402:M10053212401',
'obs1': 'Quartier 1.2',
'obs2': 'Secteur 1',
'text': 'CC AMIDONNIERS - Réguliers',
'place': {
'address': {
'num': 29,
'town': 'TOULOUSE',
'street1': 'ALL DE BRIENNE',
'street2': None,
'zipcode': '31000',
'idStreet': None,
},
'idPlace': 'M10053212401',
'libelle': 'CC AMIDONNIERS',
'latitude': 43.606099,
'libelle2': None,
'longitude': 1.430282,
},
'libelle': 'CC AMIDONNIERS',
'libelle2': None,
'manager1': {
'phone': '0561615590',
'poste': 'CCAS',
'lastname': 'THOMAS',
'firstname': 'GUYLAINE',
},
'manager2': None,
'unitList': [
{
'idUnit': 'M10053212402',
'libelle': 'CC AMIDONNIERS - Réguliers',
'typeAcc': 'REGULAR',
},
{
'idUnit': 'M10053212403',
'libelle': 'CC AMIDONNIERS - Occasionnels',
'typeAcc': 'OCCASIONAL',
},
],
'idActivity': 'M10000000001',
'idService': 'A10049327627',
'activityType': {'code': 'CRECHCO', 'libelle': 'Crèche collective'},
'activity_id': 'M10000000001',
'place_id': 'M10053212401',
'unit_id': 'M10053212402',
'unit': {
'idUnit': 'M10053212402',
'libelle': 'CC AMIDONNIERS - Réguliers',
'typeAcc': 'REGULAR',
},
assert resp.json['type'] == 'FeatureCollection'
assert len(resp.json['features']) == 6
assert resp.json['features'][0] == {
'type': 'Feature',
'geometry': {'coordinates': [1.430282, 43.606099], 'type': 'Point'},
'properties': {
'id': 'M10000000001:M10053212402:M10053212401',
'obs1': 'Quartier 1.2',
'obs2': 'Secteur 1',
'text': 'CC AMIDONNIERS - Réguliers',
'place': {
'address': {
'num': 29,
'town': 'TOULOUSE',
'street1': 'ALL DE BRIENNE',
'street2': None,
'zipcode': '31000',
'idStreet': None,
},
}
],
'err': 0,
'idPlace': 'M10053212401',
'libelle': 'CC AMIDONNIERS',
'latitude': 43.606099,
'libelle2': None,
'longitude': 1.430282,
},
'libelle': 'CC AMIDONNIERS',
'libelle2': None,
'manager1': {
'phone': '0561615590',
'poste': 'CCAS',
'lastname': 'THOMAS',
'firstname': 'GUYLAINE',
},
'manager2': None,
'unitList': [
{
'idUnit': 'M10053212402',
'libelle': 'CC AMIDONNIERS - Réguliers',
'typeAcc': 'REGULAR',
},
{
'idUnit': 'M10053212403',
'libelle': 'CC AMIDONNIERS - Occasionnels',
'typeAcc': 'OCCASIONAL',
},
],
'idActivity': 'M10000000001',
'idService': 'A10049327627',
'activityType': {'code': 'CRECHCO', 'libelle': 'Crèche collective'},
'activity_id': 'M10000000001',
'place_id': 'M10053212401',
'unit_id': 'M10053212402',
'unit': {
'idUnit': 'M10053212402',
'libelle': 'CC AMIDONNIERS - Réguliers',
'typeAcc': 'REGULAR',
},
},
}