Skip to content
Closed
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "0a2740f", "specHash": "8b51a89", "version": "4.0.0" }
{ "engineHash": "522a2bf", "specHash": "8b51a89", "version": "4.0.0" }
2 changes: 1 addition & 1 deletion .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"

- name: Install Tox
run: pip install tox
Expand Down
10 changes: 2 additions & 8 deletions test/boxsdk/unit/test_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,14 @@ def test_box_api_exception():
assert box_exception.url == url
assert box_exception.method == method
assert box_exception.context_info == context_info
assert (
str(box_exception)
== f'''Message: {message}
assert str(box_exception) == f'''Message: {message}
Status: {status}
Code: {code}
Request ID: {request_id}
Headers: {headers}
URL: {url}
Method: {method}
Context Info: {context_info}'''
)


@pytest.mark.parametrize('has_network_response', [True, False])
Expand All @@ -62,13 +59,10 @@ def test_box_oauth_exception(has_network_response):
method=method,
network_response=network_response,
)
assert (
str(box_exception)
== f'''
assert str(box_exception) == f'''
Message: {message}
Status: {status}
URL: {url}
Method: {method}
Headers: {headers if has_network_response else 'N/A'}'''
)
assert box_exception.network_response is network_response
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ deps =

[testenv:format]
commands =
black --skip-string-normalization .
black --preview --skip-string-normalization .
deps = black

[testenv:format-check]
commands =
black --skip-string-normalization --check .
black --preview --skip-string-normalization --check .
deps = black


Expand Down