Files
flucto-heisskleber/tests/console/test_console_sink.py
Felix Weiler cf0f8e73c2 Add registry for all senders, receivers and config files. (#188)
* Add registry for all senders, receivers and config files.

Minor tweaks to signatures of SerialReceiver and ConsoleSender to
maintain compability with ather Senders and Receivers.

* fixed failing console test

* fixed import order

---------

Co-authored-by: Aljoscha Sander <aljoscha@flucto.tech>
2025-01-23 14:24:37 +01:00

14 lines
308 B
Python

import pytest
from heisskleber.console import ConsoleConf, ConsoleSender
@pytest.mark.asyncio
async def test_console_sink(capsys) -> None:
sink = ConsoleSender(ConsoleConf())
await sink.send({"key": 3}, "test")
captured = capsys.readouterr()
assert captured.out == 'test:\t{"key": 3}\n'