unitelabs.bus.testing.mock_factory

Attributes

  • Name
    Stub
    Type
    Value

    = typing.Callable[[bytes], typing.Optional[bytes]]

    Description

Functions

  • create_mock_connection(
      protocol_factory : typing.Callable[..., asyncio.Protocol],
      stubs : typing.Optional[list[Stub]],
      **kwargs
    ) -> typing.Tuple[Transport, asyncio.Protocol]

    Parameters

    • Name
      protocol_factory
      Type
      typing.Callable[..., asyncio.Protocol]
      Default
      Description

    • Name
      stubs
      Type
      typing.Optional[list[Stub]]
      Default
      = None
      Description

    • Name
      **kwargs
      Type
      Default
      = {}
      Description

    Response

    Type
    typing.Tuple[Transport, asyncio.Protocol]
    Description

Copyright © 2024