diff --git a/tests/core/manager/test_response_formatters.py b/tests/core/manager/test_response_formatters.py index 17ea575563..952499e585 100644 --- a/tests/core/manager/test_response_formatters.py +++ b/tests/core/manager/test_response_formatters.py @@ -84,20 +84,23 @@ {"error": {"code": -32601, "message": (METHOD_UNAVAILABLE_MSG)}}, ) ERROR_RESPONSE_INVALID_ID = merge(VALID_ERROR_RESPONSE, {"id": b"invalid"}) -ERROR_RESPONSE_INVALID_ERROR_OBJECT = merge( - VALID_ERROR_RESPONSE, {"error": METHOD_UNAVAILABLE_MSG} -) + ERROR_RESPONSE_INVALID_CODE = merge(VALID_ERROR_RESPONSE, {"error": {"code": "-32601"}}) -ERROR_RESPONSE_INVALID_MESSAGE = merge( - VALID_ERROR_RESPONSE, {"error": {"code": -32000, "message": {}}} -) ERROR_RESPONSE_INVALID_MISSING_CODE = merge( VALID_ERROR_RESPONSE, {"error": {"message": "msg"}} ) + +ERROR_RESPONSE_INVALID_MESSAGE = merge( + VALID_ERROR_RESPONSE, {"error": {"code": -32000, "message": {}}} +) ERROR_RESPONSE_INVALID_MISSING_MESSAGE = merge( VALID_ERROR_RESPONSE, {"error": {"code": -32000}} ) +ERROR_RESPONSE_INVALID_ERROR_OBJECT = merge( + VALID_ERROR_RESPONSE, {"error": METHOD_UNAVAILABLE_MSG} +) + # result object validation VALID_RESPONSE_NULL_RESULT = merge(VALID_RESULT_OBJ_RESPONSE, {"result": None}) VALID_RESPONSE_0x_RESULT = merge(VALID_RESULT_OBJ_RESPONSE, {"result": "0x"}) @@ -283,13 +286,6 @@ def test_formatted_response_invalid_error_object( Web3RPCError, f'{VALID_ERROR_RESPONSE["error"]}\nUser message: {DEFAULT_USER_MSG}', ), - ( - # Valid error response with no null result formatters raises `Web3RPCError` - identity, - identity, - Web3RPCError, - f'{VALID_ERROR_RESPONSE["error"]}\nUser message: {DEFAULT_USER_MSG}', - ), ), ) def test_formatted_response_error_responses_with_formatters_raise_expected_exceptions(