From 7cc811181748cd7c5be08f04947d83e472f41714 Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Thu, 7 May 2020 12:20:22 -0700 Subject: [PATCH] auto-t: Use changed get_ordered_network API Rely on internal scan and wait implementation of get_ordered_network to obtain the known networks --- autotests/testAP/failure_test.py | 11 +---------- autotests/testAP/test.py | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/autotests/testAP/failure_test.py b/autotests/testAP/failure_test.py index 2c1e14b3..9944abaa 100644 --- a/autotests/testAP/failure_test.py +++ b/autotests/testAP/failure_test.py @@ -14,17 +14,8 @@ import testutil class Test(unittest.TestCase): def client_connect(self, wd, dev): - condition = 'not obj.scanning' - wd.wait_for_object_condition(dev, condition) - if not dev.get_ordered_networks(): - dev.scan() - condition = 'obj.scanning' - wd.wait_for_object_condition(dev, condition) - condition = 'not obj.scanning' - wd.wait_for_object_condition(dev, condition) - - ordered_network = dev.get_ordered_network('TestAP1') + ordered_network = dev.get_ordered_network('TestAP1', True) self.assertEqual(ordered_network.type, NetworkType.psk) diff --git a/autotests/testAP/test.py b/autotests/testAP/test.py index 455c9916..4cacf9ad 100644 --- a/autotests/testAP/test.py +++ b/autotests/testAP/test.py @@ -14,17 +14,8 @@ import testutil class Test(unittest.TestCase): def client_connect(self, wd, dev): - condition = 'not obj.scanning' - wd.wait_for_object_condition(dev, condition) - if not dev.get_ordered_networks(): - dev.scan() - condition = 'obj.scanning' - wd.wait_for_object_condition(dev, condition) - condition = 'not obj.scanning' - wd.wait_for_object_condition(dev, condition) - - ordered_network = dev.get_ordered_network('TestAP1') + ordered_network = dev.get_ordered_network('TestAP1', True) self.assertEqual(ordered_network.type, NetworkType.psk)