diff mbox series

[07/11] auto-t: add Device.event_ocurred

Message ID 20240227183405.257206-7-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [01/11] doc: Document UseDefaultEccGroup | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Feb. 27, 2024, 6:34 p.m. UTC
Checks that an event happened previously, and consumes events. This
is useful for checking that an event did not happen after some
testing operations.
---
 autotests/util/iwd.py | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
index 52c35e3d..511fb3a5 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()