@@ -184,25 +184,24 @@ def test_populate_wfs(populate_wfs_layers, main_db_params):
184
184
conn .close ()
185
185
186
186
187
- # TODO: disabled for testing
188
- # def test_populate_arcgis(populate_closest_data_to_arcgis_layers, main_db_params):
189
- # conn = psycopg2.connect(**main_db_params)
190
- # try:
191
- # with conn.cursor() as cur:
192
- # print(ArcGisLoader.TABLE_NAMES)
193
- # for metadata_table, data_tables in ArcGisLoader.TABLE_NAMES.items():
194
- # for table_name in data_tables.values():
195
- # print(table_name)
196
- # cur.execute(f"SELECT count(*) FROM kooste.{table_name}")
197
- # count = cur.fetchone()[0]
198
-
199
- # # Temporarily disable layer size check, as long as
200
- # # SYKE arcrest API is unreliable
201
- # # assert count > 0
202
-
203
- # # Whenever arcgis parameters are slightly wrong, it just
204
- # # returns *all* the data. Way to design an API with such
205
- # # a baseload. Check that we don't get all 40 000 geometries
206
- # assert count < 1000
207
- # finally:
208
- # conn.close()
187
+ def test_populate_arcgis (populate_closest_data_to_arcgis_layers , main_db_params ):
188
+ conn = psycopg2 .connect (** main_db_params )
189
+ try :
190
+ with conn .cursor () as cur :
191
+ print (ArcGisLoader .TABLE_NAMES )
192
+ for metadata_table , data_tables in ArcGisLoader .TABLE_NAMES .items ():
193
+ for table_name in data_tables .values ():
194
+ print (table_name )
195
+ cur .execute (f"SELECT count(*) FROM kooste.{ table_name } " )
196
+ count = cur .fetchone ()[0 ]
197
+
198
+ # Temporarily disable layer size check, as long as
199
+ # SYKE arcrest API is unreliable
200
+ # assert count > 0
201
+
202
+ # Whenever arcgis parameters are slightly wrong, it just
203
+ # returns *all* the data. Way to design an API with such
204
+ # a baseload. Check that we don't get all 40 000 geometries
205
+ assert count < 1000
206
+ finally :
207
+ conn .close ()
0 commit comments