# -*- coding: utf-8 -*-
# type: ignore
from __future__ import annotations

import uuid

import pytest


@pytest.fixture
def rpc_call_factory():
    def factory(method, params, id_=None):
        return {
            'jsonrpc': '2.0',
            'id': str(id_ or uuid.uuid4()),
            'method': method,
            'params': params,
        }

    return factory
