mirror of
https://github.com/corazoncp/zoom-sched-poc.git
synced 2026-12-01 12:50:31 +00:00
test(r30/CR-07): verify handle_zoom_error clamps non-4xx/5xx to 502
- Add parametrized test_zoom_api_error_clamps_non_4xx_5xx_status_to_502 for 302, 399, and 600 - Confirm DELETE during payment_processing is already covered by dedicated test_delete_during_payment_processing_returns_409_and_preserves_row
This commit is contained in:
1 parent
b1d86f1ea9
commit
93356a6871
1 file changed
+13
@@ -815,6 +815,19 @@ def test_zoom_api_error_status_passthrough_returns_401(client, monkeypatch):
|
||||
assert resp.get_json()["zoom_status"] == 401
|
||||
|
||||
|
||||
@pytest.mark.parametrize("raw_status", [302, 399, 600])
|
||||
def test_zoom_api_error_clamps_non_4xx_5xx_status_to_502(client, monkeypatch, raw_status):
|
||||
test_client, _ = client
|
||||
monkeypatch.setattr(
|
||||
zoom.requests,
|
||||
"post",
|
||||
lambda url, **kwargs: FakeResponse(raw_status, {"reason": "Unexpected upstream status"}),
|
||||
)
|
||||
resp = test_client.post("/api/zoom/verify-credentials", json=SAMPLE_CREDS)
|
||||
assert resp.status_code == 502
|
||||
assert resp.get_json()["zoom_status"] == raw_status
|
||||
|
||||
|
||||
def test_zoom_request_exception_returns_502(client, monkeypatch):
|
||||
test_client, _ = client
|
||||
|
||||
|
||||
Reference in new issue
Block a user