Skip to content

Commit

Permalink
Fix ruff warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Jul 2, 2024
1 parent 4ba0d34 commit bd2b824
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/test_etag.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def test_etag_check_etag_wrong_method_warning(
assert not recwarn
else:
assert len(recwarn) == 1
assert recwarn[0].category == UserWarning
assert recwarn[0].category is UserWarning
assert str(recwarn[0].message) == (
f"ETag cannot be checked on {method} request."
)
Expand All @@ -250,7 +250,7 @@ def test_etag_verify_check_etag_warning(self, app, method, recwarn):
blp._verify_check_etag()
if method in ["PUT", "PATCH", "DELETE"]:
assert len(recwarn) == 1
assert recwarn[0].category == UserWarning
assert recwarn[0].category is UserWarning
assert str(recwarn[0].message) == (
f"ETag not checked in endpoint {f_request.endpoint} "
f"on {method} request."
Expand Down Expand Up @@ -345,7 +345,7 @@ def test_etag_set_etag_method_not_allowed_warning(
assert not recwarn
else:
assert len(recwarn) == 1
assert recwarn[0].category == UserWarning
assert recwarn[0].category is UserWarning
assert str(recwarn[0].message) == (
f"ETag cannot be set on {method} request."
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def func(pagination_parameters):
assert not recwarn
else:
assert len(recwarn) == 1
assert recwarn[0].category == UserWarning
assert recwarn[0].category is UserWarning
assert str(recwarn[0].message) == (
"item_count not set in endpoint test.func."
)
Expand Down

0 comments on commit bd2b824

Please sign in to comment.