<filename>engine/test/mock_app/mock_stream_timeout.py
import asyncio

from hopeit.app.logger import app_extra_logger
from hopeit.app.context import EventContext

__steps__ = ['wait']

from mock_app import MockData, MockResult

logger, extra = app_extra_logger()


async def wait(payload: MockData, context: EventContext) -> MockResult:
    logger.info(context, "mock_stream_timeout.wait")
    if payload.value == "timeout":
        await asyncio.sleep(5.0)
    return MockResult("ok: ok")

<filename>engine/test/mock_app/mock_stream_timeout.py
import asyncio

from hopeit.app.logger import app_extra_logger
from hopeit.app.context import EventContext

__steps__ = ['wait']

from mock_app import MockData, MockResult

logger, extra = app_extra_logger()


async def wait(payload: MockData, context: EventContext) -> MockResult:
    logger.info(context, "mock_stream_timeout.wait")
    if payload.value == "timeout":
        await asyncio.sleep(5.0)
    return MockResult("ok: ok")
