Skip to content

Commit

Permalink
test: test added to check if contributions.count.density.groupbybound…
Browse files Browse the repository at this point in the history
…ary is a pandas.dataframe
  • Loading branch information
rp280 committed Nov 29, 2023
1 parent 71e5ea4 commit e427c32
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ohsome/test/test_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,25 @@ def test_contributions_centroid(base_client):
assert len(result) == 1


def test_contributions_count_density_groupbyboundary(base_client):
"""
Tests whether the result of contributions.count.density.groupbyboundary.post is converted to a pandas.DataFrame
:return:
"""
bboxes = "8.7137,49.4096,8.717,49.4119"
time = "2015-01-01,2016-01-01"
filter = "name=Krautturm and type:way"

client = base_client
response = client.contributions.count.density.groupByBoundary.post(
bboxes=bboxes, time=time, filter=filter
)
result = response.as_dataframe()

assert isinstance(result, pd.DataFrame)
assert len(result) == 1


@pytest.mark.vcr
def test_contributions_latest(base_client):
"""
Expand Down

0 comments on commit e427c32

Please sign in to comment.