3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-24 16:49:25 +01:00

auto-t: add Device.event_ocurred

Checks that an event happened previously, and consumes events. This
is useful for checking that an event did not happen after some
testing operations.
This commit is contained in:
James Prestwood 2024-02-27 10:34:01 -08:00 committed by Denis Kenzior
parent fba4ee90d0
commit c2ef5f3f68

View File

@ -303,6 +303,9 @@ class StationDebug(IWDDBusAbstract):
return ctx.non_block_wait(self._poll_event, timeout, event, return ctx.non_block_wait(self._poll_event, timeout, event,
exception=TimeoutError("waiting for event")) exception=TimeoutError("waiting for event"))
def event_ocurred(self, event):
return self._poll_event(event)
class DeviceProvisioning(IWDDBusAbstract): class DeviceProvisioning(IWDDBusAbstract):
''' '''
Class represents net.connman.iwd.DeviceProvisioning Class represents net.connman.iwd.DeviceProvisioning
@ -856,6 +859,9 @@ class Device(IWDDBusAbstract):
def wait_for_event(self, event, timeout=10): def wait_for_event(self, event, timeout=10):
self._station_debug.wait_for_event(event, timeout) self._station_debug.wait_for_event(event, timeout)
def event_ocurred(self, event):
return self._station_debug.event_ocurred(event)
def dpp_start_enrollee(self): def dpp_start_enrollee(self):
ret = self._device_provisioning.start_enrollee() ret = self._device_provisioning.start_enrollee()