def test_wps_ultimate_question():
    client = client_for(Service(processes=[UltimateQuestion()]))
    resp = client.get(service='WPS',
                      request='Execute',
                      version='1.0.0',
                      identifier='ultimate_question')
    assert_response_success(resp)
Exemple #2
0
def test_wps_chomsky():
    client = client_for(Service(processes=[Chomsky()]))
    datainputs = "times=10"
    resp = client.get(
        service='WPS', request='Execute', version='1.0.0',
        identifier='chomsky',
        datainputs=datainputs)
    assert_response_success(resp)
Exemple #3
0
def test_wps_dummy():
    client = client_for(Service(processes=[Dummy()]))
    datainputs = "input1=10;input2=2"
    resp = client.get(service='WPS',
                      request='Execute',
                      version='1.0.0',
                      identifier='dummyprocess',
                      datainputs=datainputs)
    assert_response_success(resp)
Exemple #4
0
def test_wps_hello():
    client = client_for(Service(processes=[Hello()]))
    datainputs = "name=LovelySugarBird"
    resp = client.get(service='WPS',
                      request='Execute',
                      version='1.0.0',
                      identifier='hello',
                      datainputs=datainputs)
    assert_response_success(resp)
Exemple #5
0
def test_wps_bbox():
    client = client_for(Service(processes=[Box()]))
    datainputs = "bbox=101,42,110,46"
    resp = client.get(service='WPS',
                      request='Execute',
                      version='1.0.0',
                      identifier='bbox',
                      datainputs=datainputs)
    assert_response_success(resp)
def test_wps_wordcount():
    client = client_for(Service(processes=[WordCounter()]))
    datainputs = "text={0}".format(
        "https://en.wikipedia.org/wiki/Web_Processing_Service")
    resp = client.get(
        service='wps', request='execute', version='1.0.0',
        identifier='wordcounter',
        datainputs=datainputs)
    assert_response_success(resp)
Exemple #7
0
def test_wps_inout():
    client = client_for(Service(processes=[InOut()]))
    datainputs = "string=onetwothree;int=7;float=2.0;boolean=0"
    resp = client.get(service='WPS',
                      request='Execute',
                      version='1.0.0',
                      identifier='inout',
                      datainputs=datainputs)
    print resp.data
    assert_response_success(resp)
Exemple #8
0
def test_caps():
    client = client_for()
    resp = client.get(service='wps', request='getcapabilities')
    names = resp.xpath_text('/wps:Capabilities'
                            '/wps:ProcessOfferings'
                            '/wps:Process'
                            '/ows:Identifier')
    assert sorted(names.split()) == [
        'bbox', 'chomsky', 'dummyprocess', 'hello', 'inout',
        'ultimate_question', 'wordcount'
    ]