Skip to content

Commit cd7b257

Browse files
committed
finally caught warning ?
1 parent b0adc1d commit cd7b257

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/lomas_server/tests/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import warnings
12
from json import loads
23
from test.support import sleeping_retry
34

@@ -33,6 +34,10 @@ def submit_job_wait(
3334
return Job(status="failed", status_code=query_job_submit.status_code, error=error)
3435

3536
job_uid = query_job_submit.json()["uid"]
36-
job = wait_for_job(client, f"/status/{job_uid}", headers=headers)
37+
38+
# Didn't manage to Job.model_validate without warning from TypeAdapter
39+
with warnings.catch_warnings():
40+
warnings.simplefilter("ignore", UserWarning)
41+
job = wait_for_job(client, f"/status/{job_uid}", headers=headers)
3742

3843
return job

0 commit comments

Comments
 (0)