File tree 1 file changed +3
-3
lines changed
_test_unstructured_client/unit
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ def test_unit_retry_with_backoff_does_retry(caplog):
24
24
)
25
25
26
26
with requests_mock .Mocker () as mock :
27
- # mock a 500 status code for POST requests to the api
28
- mock .post ("https://api.unstructuredapp.io/general/v0/general" , status_code = 500 )
27
+ # mock a 502 status code for POST requests to the api
28
+ mock .post ("https://api.unstructuredapp.io/general/v0/general" , status_code = 502 )
29
29
session = UnstructuredClient (api_key_auth = FAKE_KEY )
30
30
31
31
with open (filename , "rb" ) as f :
@@ -35,7 +35,7 @@ def test_unit_retry_with_backoff_does_retry(caplog):
35
35
36
36
with pytest .raises (Exception ) as excinfo :
37
37
resp = session .general .partition (req , retries = retries )
38
- assert resp .status_code == 500
38
+ assert resp .status_code == 502
39
39
assert "API error occurred" in str (excinfo .value )
40
40
41
41
# the number of retries varies
You can’t perform that action at this time.
0 commit comments