def test_url(self): if not service_ok('https://demo.mapserver.org'): self.skipTest("mapserver is unreachable") wfsResource = 'http://demo.mapserver.org/cgi-bin/wfs?' \ 'service=WFS&version=1.1.0&' \ 'request=GetFeature&' \ 'typename=continents&maxfeatures=2' self._value = requests.get(wfsResource).text self.iohandler.url = wfsResource self._test_outout(SOURCE_TYPE.URL)
def test_wcs(self): if not config.CONFIG.get('grass', 'gisbase'): self.skipTest('GRASS lib not found') if not service_ok('https://demo.mapserver.org'): self.skipTest("mapserver is unreachable") client = client_for(Service(processes=[create_sum_one()])) request_doc = WPS.Execute( OWS.Identifier('sum_one'), WPS.DataInputs( WPS.Input( OWS.Identifier('input'), WPS.Reference( {'{http://www.w3.org/1999/xlink}href': wcsResource}))), WPS.ProcessOutputs(WPS.Output(OWS.Identifier('output'))), version='1.0.0') resp = client.post_xml(doc=request_doc) assert_response_success(resp)
def test_wfs(self): if not service_ok('https://demo.mapserver.org'): self.skipTest("mapserver is unreachable") client = client_for(Service(processes=[create_feature()])) request_doc = WPS.Execute( OWS.Identifier('feature'), WPS.DataInputs( WPS.Input( OWS.Identifier('input'), WPS.Reference( {'{http://www.w3.org/1999/xlink}href': wfsResource}, mimeType=FORMATS.GML.mime_type, encoding='', schema=''))), WPS.ProcessOutputs(WPS.Output(OWS.Identifier('output'))), version='1.0.0') resp = client.post_xml(doc=request_doc) assert_response_success(resp)