Event#
- class pytest_bluezenv.Event(kind, reply_cb=None, error_cb=None, reply_type=None, info=None, **kw)[source]#
Asynchronous event.
The D-Bus method arguments are exposed as attributes, so an incoming
RequestConfirmationevent hasevent.passkey. For an outgoing method call, a:replyevent exposes the call return values asevent.valuesand an:errorevent exposes the exception asevent.error.- Parameters:
kind (
str) – event kind, matched byexpect().reply_cb (
callable) – callback for a successful reply.error_cb (
callable) – callback for an error reply.reply_type (
callable) – converter for reply values.info (
dict) – event properties, also accessible as attributes.**kw – extra properties merged into
info.
Example
event = host.agent.expect("org.bluez.Agent1.RequestConfirmation") assert event.passkey == 1234
- kind#
event kind
- Type:
str
- info#
event properties (also available as attributes)
- Type:
dict
- reply_cb#
callback for an asynchronous D-Bus reply.
- Type:
callable
- error_cb#
callback for an asynchronous D-Bus error.
- Type:
callable
- reply_type#
converter for reply values.
- Type:
callable
Methods