import pytest

from pywps import Service
from pywps.tests import assert_response_success

from .common import client_for
from malleefowl.processes import processes


def test_wps_caps():
    client = client_for(Service(processes=processes))
    resp = client.get(service='wps', request='getcapabilities', version='1.0.0')
    names = resp.xpath_text('/wps:Capabilities'
                            '/wps:ProcessOfferings'
                            '/wps:Process'
                            '/ows:Identifier')
    assert sorted(names.split()) == [
        'download',
        'esgsearch',
        'thredds_download',
        'workflow'
    ]

[(11, 'pywps.Service', 'Service', False, 'from pywps import Service\n')]