dbus-fast/tests/test_aio_multi_flags.py

23 lines
616 B
Python

import pytest
from dbus_fast.aio import MessageBus
from dbus_fast.service import ServiceInterface, method
@pytest.mark.asyncio
async def test_multiple_flags_in_message():
class ExampleInterface(ServiceInterface):
def __init__(self, name):
super().__init__(name)
@method()
def Echo(self, what: "s") -> "s": # noqa: F821
return what
bus = await MessageBus().connect()
interface = ExampleInterface("test.interface")
bus.export("/test/path", interface)
await bus.request_name("test.name")
bus.disconnect()
await bus.wait_for_disconnect()