aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Prestwood <prestwoj@gmail.com>2024-02-27 10:34:01 -0800
committerDenis Kenzior <denkenz@gmail.com>2024-02-27 13:55:37 -0600
commitc2ef5f3f6843a58517cb581c87dbbfa7e9c31939 (patch)
tree6d1259084f224b927cb622e53e6710d74d5a9471
parentfba4ee90d09baccd34ebef49342ef87d408ab357 (diff)
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.
-rwxr-xr-xautotests/util/iwd.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
index 52c35e3d4..511fb3a51 100755
--- a/autotests/util/iwd.py
+++ b/autotests/util/iwd.py
@@ -303,6 +303,9 @@ class StationDebug(IWDDBusAbstract):
return ctx.non_block_wait(self._poll_event, timeout, event,
exception=TimeoutError("waiting for event"))
+ def event_ocurred(self, event):
+ return self._poll_event(event)
+
class DeviceProvisioning(IWDDBusAbstract):
'''
Class represents net.connman.iwd.DeviceProvisioning
@@ -856,6 +859,9 @@ class Device(IWDDBusAbstract):
def wait_for_event(self, event, timeout=10):
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):
ret = self._device_provisioning.start_enrollee()