Skip to content

Commit

Permalink
fix(api-requestor): bind custom values for max_retry+retry_delay
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoko committed Jun 14, 2024
1 parent 87b58a4 commit 09e3f1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crowdin_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def get_api_requestor(self) -> APIRequester:
self._api_requestor = self.API_REQUESTER_CLASS(
base_url=self.url,
timeout=self.TIMEOUT,
retry_delay=self.RETRY_DELAY,
max_retries=self.MAX_RETRIES,
default_headers=self.get_default_headers(),
extended_params=self.EXTENDED_REQUEST_PARAMS
)
Expand Down
2 changes: 2 additions & 0 deletions crowdin_api/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def test_api_requestor(self, m_APIRequester):
m_APIRequester.assert_called_once_with(
base_url=client.url,
timeout=client.TIMEOUT,
retry_delay=client.RETRY_DELAY,
max_retries=client.MAX_RETRIES,
default_headers=client.get_default_headers(),
extended_params=client.EXTENDED_REQUEST_PARAMS
)
Expand Down

0 comments on commit 09e3f1e

Please sign in to comment.