@@ -37,11 +37,6 @@ def test_default_retry_backoff_ranges(monkeypatch):
3737 assert second_retry .backoff_strategy () == pytest .approx (0.48 )
3838
3939
40- # The retries option has no effect on API requests because the Seam API
41- # uses POST, which httpx-retries does not treat as retryable. A follow-up
42- # PR will apply the retry policy to API requests without exposing the
43- # HTTP method in the SDK's public API, then remove the xfail markers.
44- @pytest .mark .xfail (reason = "TODO: Apply the retry policy to API requests" )
4540def test_seam_retries_service_unavailable_responses (recording_server ):
4641 expected_retry_count = 2
4742 responses = [SERVICE_UNAVAILABLE , SERVICE_UNAVAILABLE , DEVICES ]
@@ -52,13 +47,13 @@ def test_seam_retries_service_unavailable_responses(recording_server):
5247 endpoint = endpoint ,
5348 retries = retry_policy (total = expected_retry_count ),
5449 )
55- devices = seam .devices .list ()
50+ # TODO: Use seam.devices.list() once the generated SDK route uses GET.
51+ devices = seam .client .get ("/devices/list" )["devices" ]
5652
5753 assert len (devices ) == 1
5854 assert len (requests ) == expected_retry_count + 1
5955
6056
61- @pytest .mark .xfail (reason = "TODO: Apply the retry policy to API requests" )
6257def test_seam_stops_retrying_once_retries_are_exhausted (recording_server ):
6358 expected_retry_count = 1
6459
@@ -70,7 +65,8 @@ def test_seam_stops_retrying_once_retries_are_exhausted(recording_server):
7065 )
7166
7267 with pytest .raises (HTTPStatusError ) as exc_info :
73- seam .devices .list ()
68+ # TODO: Use seam.devices.list() once the generated SDK route uses GET.
69+ seam .client .get ("/devices/list" )
7470
7571 assert exc_info .value .response .status_code == 503
7672 assert len (requests ) == expected_retry_count + 1
@@ -83,7 +79,8 @@ def test_seam_does_not_retry_when_retries_are_disabled(recording_server):
8379 )
8480
8581 with pytest .raises (HTTPStatusError ) as exc_info :
86- seam .devices .list ()
82+ # TODO: Use seam.devices.list() once the generated SDK route uses GET.
83+ seam .client .get ("/devices/list" )
8784
8885 assert exc_info .value .response .status_code == 503
8986 assert len (requests ) == 1
0 commit comments