def test_gs_not_getting_gml_id(config_geonode_gs_WFS):
    """Testing query not returning gml_id for a specific object"""

    p = OGRProvider(config_geonode_gs_WFS)
    assert p.open_options is not None
    result = p.get_fields()
    assert result.get('gml_id') is None
def test_get_fields_gs(config_GeoServer_WFS):
    """Testing field types"""

    p = OGRProvider(config_GeoServer_WFS)
    results = p.get_fields()
    assert results['straatnaam'] == 'string'
    assert results['huisnummer'] == 'integer'
def test_get_fields_agol(config_ArcGIS_ESRIJSON):
    """Testing field types"""

    p = OGRProvider(config_ArcGIS_ESRIJSON)
    results = p.get_fields()
    assert results['fulladdr']['type'] == 'string'
    assert results['municipality']['type'] == 'string'
def test_get_fields_vsicurl(config_vsicurl_csv):
    """Testing field types"""

    p = OGRProvider(config_vsicurl_csv)
    results = p.get_fields()
    assert results['denominazione_regione'] == 'string'
    assert results['totale_positivi'] == 'string'
def test_get_fields_gs(config_MapServer_WFS_continents):
    """Testing field types"""

    p = OGRProvider(config_MapServer_WFS_continents)
    results = p.get_fields()
    assert results['NA2DESC']['type'] == 'string'
    assert results['NA3DESC']['type'] == 'string'
def test_gs_force_getting_gml_id(config_geonode_gs_WFS):
    """Testing query forcing to return gml_id for a specific object"""

    p = OGRProvider(config_geonode_gs_WFS)
    assert p.open_options is not None
    p.open_options['EXPOSE_GML_ID'] = 'YES'
    result = p.get_fields()
    assert result.get('gml_id')
def test_get_fields_4326(config_shapefile_4326):
    """Testing field types"""
    p = OGRProvider(config_shapefile_4326)
    results = p.get_fields()
    assert results['straatnaam'] == 'string'
    assert results['huisnummer'] == 'string'