# Copyright (c) 2026 Krzysztof Rudnicki. MIT licence. """The in-process transport double.""" from __future__ import annotations from signal_bot.transport_fake import FakeTransport async def test_queue_and_receive() -> None: transport = FakeTransport() transport.queue(["a", "b"]) assert [f async for f in transport.receive()] == ["a", "b"] async def test_records_sends() -> None: transport = FakeTransport() await transport.send_text("hi", "g") await transport.send_image("B64", "g") assert transport.texts == ["hi"] assert transport.sent[1].image_base64 == "B64" async def test_attachments_round_trip() -> None: transport = FakeTransport(attachments=["a1"]) assert await transport.list_attachments() == ["a1"] await transport.delete_attachment("a1") assert transport.deleted == ["a1"]