Skip to content
Snippets Groups Projects
Commit 20e40776 authored by Maël Méliani's avatar Maël Méliani
Browse files

Removed /tests/ api and updated test file. Also removed model.map.

parent ddb2d2e1
No related branches found
No related tags found
No related merge requests found
MAP
NAME "model"
STATUS ON
IMAGETYPE "png"
RESOLUTION 96
SIZE 600 600
EXTENT -180 -90 180 90
UNITS DD
OUTPUTFORMAT
NAME "png"
MIMETYPE "image/png"
DRIVER "AGG/PNG"
EXTENSION "png"
IMAGEMODE RGBA
TRANSPARENT TRUE
END
OUTPUTFORMAT
NAME "png8"
MIMETYPE "image/png; mode=8bit"
DRIVER "AGG/PNG8"
EXTENSION "png"
IMAGEMODE RGB
TRANSPARENT FALSE
FORMATOPTION "QUANTIZE_FORCE=on"
FORMATOPTION "QUANTIZE_COLORS=256"
FORMATOPTION "GAMMA=0.75"
END
OUTPUTFORMAT
NAME "jpeg"
MIMETYPE "image/jpeg"
DRIVER "AGG/JPEG"
EXTENSION "jpg"
IMAGEMODE RGB
TRANSPARENT FALSE
FORMATOPTION "GAMMA=0.75"
END
PROJECTION
"init=epsg:4326"
END
LEGEND
KEYSIZE 20 10
KEYSPACING 5 5
LABEL
SIZE MEDIUM
OFFSET 0 0
SHADOWSIZE 1 1
TYPE BITMAP
END
STATUS OFF
END
WEB
TEMPLATE "foo"
METADATA
ows_title "model"
ows_abstract "This is a model"
ows_onlineresource ""
ows_service_onlineresource ""
ows_schemas_location "http://schemas.opengeospatial.net"
ows_server_version "1.3.0"
ows_encoding "UTF-8"
ows_srs "EPSG:4326"
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
# `mra' meta contains all the information that MapserverRestAPI #
# needs to work properly. #
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
"mra" "{coveragestores: {}, datastores: {}, layergroups: {}, workspaces: {default: {title: default}}}"
END
END
END
\ No newline at end of file
...@@ -51,14 +51,6 @@ class index(object): ...@@ -51,14 +51,6 @@ class index(object):
def GET(self, format): def GET(self, format):
return "This is MRA." return "This is MRA."
class tests(object):
def PUT(self, name, format):
spath = tools.safe_path_join(get_config('storage')['mapfiles'], "%s.map" % get_config("testing")["model"])
tpath = tools.safe_path_join(get_config('storage')['mapfiles'], "%s.map" % name)
open(tpath, "w").write(open(spath).read())
webapp.Created("%s/maps/%s%s" % (web.ctx.home, name, format or ""))
class mapfiles(object): class mapfiles(object):
@HTTPCompatible() @HTTPCompatible()
def GET(self, format): def GET(self, format):
......
...@@ -365,7 +365,6 @@ def test_scenario(): ...@@ -365,7 +365,6 @@ def test_scenario():
map_name = "tests" map_name = "tests"
# Clean the test file, now we are sure it is empty. # Clean the test file, now we are sure it is empty.
# APIRequest("PUT", target + "/tests/" + map_name)
APIRequest("DELETE", target + "/maps/" + map_name) APIRequest("DELETE", target + "/maps/" + map_name)
APIRequest("POST", target + "/maps", {"mapfile":{"name":map_name}}) APIRequest("POST", target + "/maps", {"mapfile":{"name":map_name}})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment