Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
SlowMo24 committed Nov 29, 2023
1 parent 97ee8d6 commit 68964f7
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
interactions:
- request:
body: bboxes=8.7137%2C49.4096%2C8.717%2C49.4119&time=2015-01-01%2C2016-01-01&filter=name%3DKrautturm+and+type%3Away
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '109'
Content-Type:
- application/x-www-form-urlencoded
user-agent:
- ohsome-py/0.2.0
method: POST
uri: https://api.ohsome.org/v1/contributions/count/density/groupBy/boundary
response:
body:
string: "{\n \"attribution\" : {\n \"url\" : \"https://ohsome.org/copyrights\",\n
\ \"text\" : \"\xA9 OpenStreetMap contributors\"\n },\n \"apiVersion\"
: \"1.10.1\",\n \"groupByResult\" : [ {\n \"groupByObject\" : \"boundary1\",\n
\ \"result\" : [ {\n \"fromTimestamp\" : \"2015-01-01T00:00:00Z\",\n
\ \"toTimestamp\" : \"2016-01-01T00:00:00Z\",\n \"value\" : 16.32\n
\ } ]\n } ]\n}"
headers:
Access-Control-Allow-Credentials:
- 'true'
Access-Control-Allow-Headers:
- Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization
Access-Control-Allow-Methods:
- POST, GET
Access-Control-Allow-Origin:
- '*'
Access-Control-Max-Age:
- '3600'
Cache-Control:
- no-transform, public, max-age=31556926
Connection:
- Keep-Alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Wed, 29 Nov 2023 13:30:04 GMT
Keep-Alive:
- timeout=5, max=100
Server:
- Apache
Strict-Transport-Security:
- max-age=63072000; includeSubdomains;
Transfer-Encoding:
- chunked
vary:
- accept-encoding
status:
code: 200
message: ''
version: 1
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ interactions:
Content-disposition:
- attachment;filename=ohsome.geojson
Date:
- Fri, 17 Nov 2023 14:22:26 GMT
- Wed, 29 Nov 2023 13:30:01 GMT
Keep-Alive:
- timeout=5, max=100
Server:
Expand Down
1 change: 1 addition & 0 deletions ohsome/test/test_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ def test_contributions_centroid(base_client):
assert len(result) == 1


@pytest.mark.vcr
def test_contributions_count_density_groupbyboundary(base_client):
"""
Tests whether the result of contributions.count.density.groupbyboundary.post is converted to a pandas.DataFrame
Expand Down

0 comments on commit 68964f7

Please sign in to comment.