def test_format_geodataframe():
    bpolys = geojson.FeatureCollection([{'type': 'Feature', 'properties': {'id': 0}, 'geometry': {'coordinates': [[[[13, 51], [13, 51.1], [13.1, 51.1], [13.1, 51], [13, 51]]], [[[14, 51], [14, 51.1], [14.1, 51.1], [14.1, 51], [14, 51]]]], 'type': 'MultiPolygon'}}])
    bpolys_df = gpd.GeoDataFrame().from_features(bpolys)
    time = '2018-01-01'
    keys = ['amenity']
    values = ['']
    format = 'geojson'
    properties = ['tags', 'metadata']
    client = ohsome.OhsomeClient()
    response = client.elements.count.groupBy.boundary.post(bpolys=bpolys_df, time=time, keys=keys, values=values, format=format, properties=properties)
    result = response.as_geodataframe()
    del client
    assert (result['value'][0] == 538)
def test_format_geodataframe():
    bpolys = geojson.FeatureCollection([{'type': 'Feature', 'properties': {'id': 0}, 'geometry': {'coordinates': [[[[13, 51], [13, 51.1], [13.1, 51.1], [13.1, 51], [13, 51]]], [[[14, 51], [14, 51.1], [14.1, 51.1], [14.1, 51], [14, 51]]]], 'type': 'MultiPolygon'}}])
    bpolys_df = gpd.GeoDataFrame().from_features(bpolys)
    time = '2018-01-01'
    keys = ['amenity']
    values = []
    format = 'geojson'
    properties = ['tags', 'metadata']
    client = ohsome.OhsomeClient()
    response = client.elements.count.groupBy.boundary.post(bpolys=bpolys_df, time=time, keys=keys, values=values, format=format, properties=properties)
    result = response.as_geodataframe()
    del client
    assert (result['value'][0] == 538)