def test_wps_subset_missing_collection(): client = client_for(Service(processes=[Subset()], cfgfiles=[PYWPS_CFG])) # datainputs = "collection=c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest" datainputs = "" resp = client.get( "?service=WPS&request=Execute&version=1.0.0&identifier=subset&datainputs={}" .format(datainputs)) assert_process_exception(resp, code="MissingParameterValue")
def test_wps_average_no_dim(): client = client_for( Service(processes=[AverageByDimension()], cfgfiles=[PYWPS_CFG])) datainputs = "collection=c3s-cmip6.ScenarioMIP.INM.INM-CM5-0.ssp245.r1i1p1f1.Amon.rlds.gr1.v20190619" resp = client.get( f"?service=WPS&request=Execute&version=1.0.0&identifier=average&datainputs={datainputs}" ) # print(resp.data) assert_process_exception(resp, code="MissingParameterValue")
def test_get_request_nonexisting_process_args(self): resp = self.client.get( '?Request=DescribeProcess&version=1.0.0&service=wps&identifier=NONEXISTINGPROCESS' ) # bad request, identifier does not exist assert_process_exception(resp, code='InvalidParameterValue')
def test_get_request_zero_args(self): # with self.assertRaises(MissingParameterValue) as e: resp = self.client.get( '?Request=DescribeProcess&version=1.0.0&service=wps') # bad request, identifier is missing assert_process_exception(resp, code='MissingParameterValue')