Skip to content

Commit

Permalink
chore: remove insensitive language (box/box-codegen#477) (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build authored Apr 26, 2024
1 parent 90ea928 commit 71bfe24
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "267eec8", "specHash": "1698c95", "version": "0.6.4" }
{ "engineHash": "c437976", "specHash": "1698c95", "version": "0.6.4" }
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# pygtk.require().
#init-hook=

# Add files or directories to the blacklist. They should be base names, not
# Add files or directories to the denylist. They should be base names, not
# paths.
#ignore=CVS

Expand Down
3 changes: 2 additions & 1 deletion box_sdk_gen/box/ccg_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,5 @@ def revoke_token(self, *, network_session: Optional[NetworkSession] = None) -> N
client_secret=self.config.client_secret,
token=old_token.access_token,
)
return self.token_storage.clear()
self.token_storage.clear()
return None
3 changes: 2 additions & 1 deletion box_sdk_gen/box/jwt_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,5 @@ def revoke_token(self, *, network_session: Optional[NetworkSession] = None) -> N
client_secret=self.config.client_secret,
token=old_token.access_token,
)
return self.token_storage.clear()
self.token_storage.clear()
return None
8 changes: 4 additions & 4 deletions test/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def test_make_request_unauthorised(mock_requests_session, response_401):
@pytest.mark.parametrize(
'exc_message, expected_reauthentication_needed',
[
('Connection aborted', False),
('Connection cancelled', False),
(
"Connection broken: ConnectionResetError(54, 'Connection reset by peer')",
False,
Expand Down Expand Up @@ -334,7 +334,7 @@ def test_make_request_network_exception(
def test_fetch_successfully_retry_network_exception(
mock_requests_session, network_session_mock, response_200
):
requests_exception = RequestException('Connection aborted')
requests_exception = RequestException('Connection cancelled')
mock_requests_session.request.side_effect = [requests_exception, response_200]

with patch('time.sleep'):
Expand All @@ -347,11 +347,11 @@ def test_fetch_successfully_retry_network_exception(
def test_fetch_make_only_one_retry_for_network_exception(
mock_requests_session, network_session_mock
):
requests_exception = RequestException('Connection aborted')
requests_exception = RequestException('Connection cancelled')
mock_requests_session.request.side_effect = [requests_exception, requests_exception]

with patch('time.sleep'):
with pytest.raises(BoxSDKError, match='Connection aborted'):
with pytest.raises(BoxSDKError, match='Connection cancelled'):
fetch(
"https://example.com",
FetchOptions(network_session=network_session_mock),
Expand Down

0 comments on commit 71bfe24

Please sign in to comment.