diff --git a/tests/test_etag.py b/tests/test_etag.py index a6e74dc8..ff64d391 100644 --- a/tests/test_etag.py +++ b/tests/test_etag.py @@ -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." ) @@ -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." @@ -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." ) diff --git a/tests/test_pagination.py b/tests/test_pagination.py index 455dfbed..3c445cf1 100644 --- a/tests/test_pagination.py +++ b/tests/test_pagination.py @@ -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." )