Skip to content

Commit 1b5ce23

Browse files
committed
test NEXUS-817: corrected unit test
1 parent 170b960 commit 1b5ce23

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

_test_unstructured_client/unit/test_custom_hooks.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,18 @@ def mock_post(request):
9494
@pytest.mark.parametrize(
9595
("status_code", "expect_retry"),
9696
[
97-
[500, False],
97+
[400, False],
98+
[401, False],
99+
[403, False],
100+
[404, False],
101+
[422, False],
102+
[500, True],
98103
[502, True],
99104
[503, True],
100105
[504, True],
101106
]
102107
)
103-
def test_unit_number_of_retries_in_5xx(status_code: int, expect_retry: bool):
108+
def test_unit_number_of_retries_in_failed_requests(status_code: int, expect_retry: bool):
104109
filename = "README.md"
105110
backoff_strategy = BackoffStrategy(
106111
initial_interval=1, max_interval=10, exponent=1.5, max_elapsed_time=300

0 commit comments

Comments
 (0)