Skip to content

Commit 51019df

Browse files
committed
Update test_assync.py to properly read status
1 parent d1b94c3 commit 51019df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: tests/test_assync.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pywps.tests import client_for, assert_response_accepted, assert_response_success
1212
from .processes import Sleep
1313
from owslib.wps import WPSExecution
14-
from pathlib import Path
14+
from urllib.parse import urlparse
1515

1616
VERSION = "1.0.0"
1717

@@ -49,13 +49,13 @@ def test_async(self):
4949
url = resp.xml.xpath("//@statusLocation")[0]
5050

5151
# OWSlib only reads from URLs, not local files. So we need to read the response manually.
52-
p = Path(url[6:])
52+
url = urlparse(url)
5353

5454
# Poll the process until it completes
5555
total_time = 0
5656
sleep_time = .01
5757
while wps.status not in ["ProcessSucceeded", "ProcessFailed"]:
58-
resp = p.read_bytes()
58+
resp = client.get(f'{url.path}?{url.query}').data
5959
if resp:
6060
wps.checkStatus(response=resp, sleepSecs=0.01)
6161
else:

0 commit comments

Comments
 (0)