handle Maps worker response casing

This commit is contained in:
Marco0300
2026-09-05 16:29:59 +02:00
parent dbf0ed0999
commit 3d2b87b2df
2 changed files with 20 additions and 5 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ class BrowserOnlyAppTests(unittest.TestCase):
with patch.object(server, "GMAPS_URL", "http://gmaps:8080"), \
patch.object(server, "GMAPS_API_MODE", "standard"), \
patch.object(server, "GMAPS_API_KEY", ""), \
patch("api.server.http_json", side_effect=[{"id": "job-1"}, {"id": "job-1", "status": "pending"}, {"id": "job-1", "status": "working"}, {"id": "job-1", "status": "ok"}]) as http_json, \
patch("api.server.http_json", side_effect=[{"id": "job-1"}, {"ID": "job-1", "Status": "pending"}, {"ID": "job-1", "Status": "working"}, {"ID": "job-1", "Status": "ok"}]) as http_json, \
patch("api.server.http_bytes", return_value=csv_body) as http_bytes:
job_id = server.submit_gmaps_job("plumbers Cape Town")
results = server.poll_gmaps_job(job_id)