-
Notifications
You must be signed in to change notification settings - Fork 273
/
test_ogcapi_processes_52n.py
44 lines (32 loc) · 1.33 KB
/
test_ogcapi_processes_52n.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from tests.utils import service_ok
import pytest
from owslib.ogcapi.processes import Processes
SERVICE_URL = 'http://geoprocessing.demo.52north.org:8080/javaps/rest/'
@pytest.mark.xfail
@pytest.mark.online
@pytest.mark.skipif(not service_ok(SERVICE_URL),
reason='service is unreachable')
def test_ogcapi_processes_52n():
w = Processes(SERVICE_URL)
assert w.url == 'http://geoprocessing.demo.52north.org:8080/javaps/rest/'
assert w.url_query_string is None
# TODO: RuntimeError: Did not find service-desc link
# api = w.api()
# assert api['components']['parameters'] is not None
# paths = api['paths']
# assert paths is not None
# assert paths['/processes/hello-world'] is not None
conformance = w.conformance()
assert len(conformance['conformsTo']) == 5
# list processes
processes = w.processes()
assert len(processes) > 0
# process description
echo = w.process_description('org.n52.javaps.test.EchoProcess')
assert echo['id'] == 'org.n52.javaps.test.EchoProcess'
assert echo['title'] == 'org.n52.javaps.test.EchoProcess'
# assert "An example process that takes a name as input" in echo['description']
# running jobs
jobs = w.job_list('org.n52.javaps.test.EchoProcess')
assert len(jobs) >= 0
# TODO: post request not allowed at 52n?