Skip to content

Commit 4b50603

Browse files
committed
Update test_assync.py to properly read status
1 parent 5fc64c5 commit 4b50603

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/test_assync.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,9 +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
15-
from tempfile import TemporaryDirectory
16-
from pywps import dblog
14+
from urllib.parse import urlparse
1715

1816
VERSION = "1.0.0"
1917

@@ -50,13 +48,13 @@ def test_async(self):
5048
print(url)
5149

5250
# OWSlib only reads from URLs, not local files. So we need to read the response manually.
53-
p = Path(configuration.get_config_value('server', 'outputpath')) / url.split('/')[-1]
51+
url = urlparse(url)
5452

5553
# Poll the process until it completes
5654
total_time = 0
5755
sleep_time = .01
5856
while wps.status not in ["ProcessSucceeded", "ProcessFailed"]:
59-
resp = p.read_bytes()
57+
resp = client.get(f'{url.path}?{url.query}').data
6058
if resp:
6159
wps.checkStatus(response=resp, sleepSecs=0.01)
6260
else:

0 commit comments

Comments
 (0)