From 8d3aef85b848a8932295fc6be62cafbf0db0df37 Mon Sep 17 00:00:00 2001 From: Cole Higgins Date: Mon, 8 Jan 2024 16:11:09 -0500 Subject: [PATCH] moving sca alert into sub class --- airgun/entities/subscription.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/airgun/entities/subscription.py b/airgun/entities/subscription.py index 929a0472b..20b8e812c 100644 --- a/airgun/entities/subscription.py +++ b/airgun/entities/subscription.py @@ -178,6 +178,15 @@ def read_subscriptions(self): view = self.navigate_to(self, 'All') return view.table.read() + def sca_alert(self): + view = self.navigate_to(self, 'All') + wait_for( + lambda: view.sca_alert.read(), + handle_exception=True, + timeout=10, + ) + return view.sca_alert.read() + class SubscriptionNavigationStep(NavigateStep): """To ensure that we reached the destination, some targets need extra post navigation tasks""" @@ -191,15 +200,6 @@ def post_navigate(self, _tries, *args, **kwargs): logger=self.view.logger, ) - def sca_alert(self): - view = self.navigate_to(self, 'All') - wait_for( - lambda: view.sca_alert.read(), - handle_exception=True, - timeout=10, - ) - return view.sca_alert.read() - @navigator.register(SubscriptionEntity, 'All') class SubscriptionList(SubscriptionNavigationStep):