本文整理汇总了Python中mapproxy.request.wms.wms_request函数的典型用法代码示例。如果您正苦于以下问题:Python wms_request函数的具体用法?Python wms_request怎么用?Python wms_request使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wms_request函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_invalid_request
def test_invalid_request(self):
del self.req.args["request"]
try:
wms_request(self.req)
except RequestError as e:
assert "request" in e.msg
else:
assert False, "RequestError expected"
示例2: test_blank_exception_handler
def test_blank_exception_handler(self):
self.req.args['exceptions'] = 'blank'
map_req = wms_request(self.req)
assert isinstance(map_req.exception_handler, WMSBlankExceptionHandler)
示例3: test_image_exception_handler
def test_image_exception_handler(self):
self.req.args['exceptions'] = 'application/vnd.ogc.se_inimage'
map_req = wms_request(self.req)
assert isinstance(map_req.exception_handler, WMSImageExceptionHandler)
示例4: test_exception_handler
def test_exception_handler(self):
map_req = wms_request(self.req)
assert isinstance(map_req.exception_handler, WMS111ExceptionHandler)
示例5: test_valid_request
def test_valid_request(self):
map_req = wms_request(self.req)
# constructor validates
assert map_req.params.size == (984, 708)
示例6: test_pos_coords
def test_pos_coords(self):
req = wms_request(DummyRequest(self.base_req))
eq_(req.params.pos_coords, (7.25, 50.5))
示例7: test_pos
def test_pos(self):
req = wms_request(DummyRequest(self.base_req))
eq_(req.params.pos, (100, 150))
示例8: test_basic_request
def test_basic_request(self):
req = wms_request(DummyRequest(self.base_req))#, validate=False)
assert isinstance(req, WMS111FeatureInfoRequest)
示例9: map_request
def map_request(self, layers, auth):
env = make_wsgi_env(MAP_REQ+'&layers=' + layers, extra_environ={'mapproxy.authorize': auth})
req = Request(env)
return wms_request(req)
示例10: fi_request
def fi_request(self, layers, auth):
env = make_wsgi_env(FI_REQ+'&layers=%s&query_layers=%s' % (layers, layers),
extra_environ={'mapproxy.authorize': auth})
req = Request(env)
return wms_request(req)
示例11: test_invalid_request
def test_invalid_request(self):
del self.req.args['request']
try:
wms_request(self.req)
except RequestError, e:
assert 'request' in e.msg