Skip to content

Commit

Permalink
Add content type header to test response
Browse files Browse the repository at this point in the history
Required by OWSLib 0.32
  • Loading branch information
vuilleumierc committed Nov 5, 2024
1 parent fd26ce7 commit b19e5f1
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/test_wms.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ def test_get_layers(geoserver: GeoServerCloud) -> None:
with responses.RequestsMock() as rsps:
rsps.get(
f"{geoserver.url}/{WORKSPACE}/wms",
status=200,
headers={"Content-Type": "text/xml"},
body=CAPABILITIES,
match=[
responses.matchers.query_param_matcher(
{"service": "WMS", "request": "GetCapabilities", "version": "1.3.0"}
)
],
status=200,
body=CAPABILITIES,
)

layers = geoserver.get_wms_layers(WORKSPACE)
Expand All @@ -80,13 +81,14 @@ def test_get_map(geoserver: GeoServerCloud) -> None:
with responses.RequestsMock() as rsps:
rsps.get(
f"{geoserver.url}/wms",
status=200,
headers={"Content-Type": "text/xml"},
body=CAPABILITIES,
match=[
responses.matchers.query_param_matcher(
{"service": "WMS", "request": "GetCapabilities", "version": "1.3.0"}
)
],
status=200,
body=CAPABILITIES,
)
rsps.get(
f"{geoserver.url}/wms",
Expand Down Expand Up @@ -125,13 +127,14 @@ def test_get_feature_info(geoserver: GeoServerCloud) -> None:
with responses.RequestsMock() as rsps:
rsps.get(
f"{geoserver.url}/wms",
status=200,
headers={"Content-Type": "text/xml"},
body=CAPABILITIES,
match=[
responses.matchers.query_param_matcher(
{"service": "WMS", "request": "GetCapabilities", "version": "1.3.0"}
)
],
status=200,
body=CAPABILITIES,
)
rsps.get(
f"{geoserver.url}/wms",
Expand Down Expand Up @@ -175,13 +178,14 @@ def test_get_legend(geoserver: GeoServerCloud) -> None:
with responses.RequestsMock() as rsps:
rsps.get(
f"{geoserver.url}/wms",
status=200,
headers={"Content-Type": "text/xml"},
body=CAPABILITIES,
match=[
responses.matchers.query_param_matcher(
{"service": "WMS", "request": "GetCapabilities", "version": "1.3.0"}
)
],
status=200,
body=CAPABILITIES,
)
rsps.get(
f"{geoserver.url}/wms",
Expand Down

0 comments on commit b19e5f1

Please sign in to comment.