# Path: modernrpc/exceptions.py
# RPC_INTERNAL_ERROR = -32603
# 
# RPC_METHOD_NOT_FOUND = -32601
# 
# RPC_INVALID_REQUEST = -32600


import pytest
    import requests
from modernrpc.exceptions import (
    RPC_INTERNAL_ERROR,
    RPC_METHOD_NOT_FOUND,
    RPC_INVALID_REQUEST,
)
    result = jsonrpc_client.batch_request(
        [
            ("add", {"a": 5, "b": 10}, "notify_only"),
            ("method_with_kwargs", [], "notify_only"),
            ("divide", {"numerator": 30, "denominator": 5}, "notify_only"),
        ]
    )
    assert result is None


def test_jsonrpc_batch_invalid_request(live_server, endpoint_path):

    headers = {"content-type": "application/json"}
    result = requests.post(
        live_server.url + endpoint_path, data="[1, 2, 3]", headers=headers
    ).json()

    assert isinstance(result, list)
    assert len(result) == 3

    expected_error_message = 'Invalid JSON-RPC payload, expected "object", found "int"'
    assert result == [
        {
            "id": None,
            "jsonrpc": "2.0",
            "error": {"code": RPC_INVALID_REQUEST, "message": expected_error_message},
        },
        {
            "id": None,
            "jsonrpc": "2.0",

# Path: modernrpc/exceptions.py
# RPC_INTERNAL_ERROR = -32603
# 
# RPC_METHOD_NOT_FOUND = -32601
# 
# RPC_INVALID_REQUEST = -32600


# Path: tests/functional/test_multicall_batch.py
import pytest
    import requests
from modernrpc.exceptions import (
    RPC_INTERNAL_ERROR,
    RPC_METHOD_NOT_FOUND,
    RPC_INVALID_REQUEST,
)

    result = jsonrpc_client.batch_request(
        [
            ("add", {"a": 5, "b": 10}, "notify_only"),
            ("method_with_kwargs", [], "notify_only"),
            ("divide", {"numerator": 30, "denominator": 5}, "notify_only"),
        ]
    )
    assert result is None


def test_jsonrpc_batch_invalid_request(live_server, endpoint_path):

    headers = {"content-type": "application/json"}
    result = requests.post(
        live_server.url + endpoint_path, data="[1, 2, 3]", headers=headers
    ).json()

    assert isinstance(result, list)
    assert len(result) == 3

    expected_error_message = 'Invalid JSON-RPC payload, expected "object", found "int"'
    assert result == [
        {
            "id": None,
            "jsonrpc": "2.0",
            "error": {"code": RPC_INVALID_REQUEST, "message": expected_error_message},
        },
        {
            "id": None,
            "jsonrpc": "2.0",

            "error": {"code": RPC_INVALID_REQUEST, "message": expected_error_message},