1
0
bthlabs-jsonrpc/packages/bthlabs-jsonrpc-core/tests/conftest.py

24 lines
478 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2024-01-15 20:20:10 +00:00
# type: ignore
from unittest import mock
import pytest
from bthlabs_jsonrpc_core.registry import MethodRegistry
from bthlabs_jsonrpc_core.serializer import JSONRPCSerializer
@pytest.fixture
2024-01-15 20:20:10 +00:00
def fake_method_registry() -> mock.Mock:
return mock.Mock(spec=MethodRegistry)
@pytest.fixture
2024-01-15 20:20:10 +00:00
def fake_handler() -> mock.Mock:
return mock.Mock()
@pytest.fixture
2024-01-15 20:20:10 +00:00
def fake_rpc_serializer() -> mock.Mock:
return mock.Mock(spec=JSONRPCSerializer)