def test_parallel_user():
    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'}}, {'type': 'Feature', 'properties': {'id': 1}, '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)
    timeperiod = '2017-01-01,2018-01-01'
    keys = ['amenity']
    values = ['']
    format = 'json'
    properties = ['metadata']
    client = ohsome.OhsomeClientParallel(chunksize=1)
    response = client.users.count.groupBy.boundary.post(bpolys=bpolys_df, time=timeperiod, keys=keys, values=values, format=format, properties=properties)
    result = response.as_dataframe()
    del client
    assert (result['value'][0] == 33.0)
def test_parallel_user():
    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'}}, {'type': 'Feature', 'properties': {'id': 1}, '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)
    timeperiod = '2017-01-01,2018-01-01'
    keys = ['amenity']
    values = []
    format = 'json'
    properties = ['metadata']
    client = ohsome.OhsomeClientParallel(chunksize=1)
    response = client.users.count.groupBy.boundary.post(bpolys=bpolys_df, time=timeperiod, keys=keys, values=values, format=format, properties=properties)
    result = response.as_dataframe()
    del client
    assert (result['value'][0] == 33.0)