Skip to content

Commit

Permalink
Fix dash in MS_MAP_PATTERN
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 3, 2021
1 parent d720c44 commit 99bf142
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
6 changes: 2 additions & 4 deletions acceptance_tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM camptocamp/c2cwsgiutils:5

COPY . /acceptance_tests/

WORKDIR /acceptance_tests
COPY . ./

CMD tail -f /dev/null
CMD py.test -vv --color=yes --junitxml /tmp/junitxml/results.xml
CMD ["tail", "-f", "/dev/null"]
3 changes: 2 additions & 1 deletion acceptance_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def connection_map():
Fixture that returns a connection to a running batch container.
"""
utils.wait_url(
BASE_URL_MAP + "?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAME=polygons&featureId=xxx"
BASE_URL_MAP
+ "?MAP=/etc/mapserver/mapserver.map&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAME=polygons&featureId=xxx"
)
return Connection(BASE_URL_MAP, "http://localhost")
20 changes: 19 additions & 1 deletion acceptance_tests/test_map.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
def test_get_capabilities(connection_map):
def test_get_std_map(connection_map):
ns = "{http://www.opengis.net/wms}"
answer = connection_map.get_xml(
"?MAP=/etc/mapserver/mapserver.map&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0"
)
assert [e.text for e in answer.findall("%sService/%sTitle" % (ns, ns))] == ["test"]
assert [e.text for e in answer.findall(".//%sLayer/%sName" % (ns, ns))] == ["test", "polygons"]


def test_get_multi_char_map(connection_map):
ns = "{http://www.opengis.net/wms}"
answer = connection_map.get_xml(
"?MAP=/etc/mapserver/AZ_az-0.9.map&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0"
)
assert [e.text for e in answer.findall("%sService/%sTitle" % (ns, ns))] == ["test"]
assert [e.text for e in answer.findall(".//%sLayer/%sName" % (ns, ns))] == ["test", "polygons"]


def test_get_folder_map(connection_map):
ns = "{http://www.opengis.net/wms}"
answer = connection_map.get_xml(
"?MAP=/etc/mapserver/AZ_az-0.9/AZ_az-0.9.map&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0"
)
assert [e.text for e in answer.findall("%sService/%sTitle" % (ns, ns))] == ["test"]
assert [e.text for e in answer.findall(".//%sLayer/%sName" % (ns, ns))] == ["test", "polygons"]

0 comments on commit 99bf142

Please sign in to comment.