from pywps import Service
from pywps.tests import assert_response_success

from .common import client_for
from emu.processes.wps_say_hello import SayHello


def test_wps_hello():
    client = client_for(Service(processes=[SayHello()]))
    datainputs = "name=LovelySugarBird"
    resp = client.get(
        service='WPS', request='Execute', version='1.0.0', identifier='hello',
        datainputs=datainputs)
    assert_response_success(resp)

@@ -436,8 +436,436 @@
 s(resp)%0A
+%0A%0Adef test_wps_hello_again():%0A    %22%22%22Example of how to debug this process, running outside a PyWPS instance.%0A    %22%22%22%0A    hello = SayHello()%0A    (request, response) = hello.build_request_response()%0A    literal_in = hello.inputs%5B0%5D%0A    literal_in.data = 'Alice'%0A    request.inputs%5B%22name%22%5D.append(literal_in)%0A    hello._handler(request, response)%0A%0A    assert response.outputs%5B%22output%22%5D.data == 'Hello Alice'%0A    print(%22All good!%22)%0A

test wps_hello_again added