From c961dafc50f19fba385cd7cd9c1095b68ce2338a Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 14 Nov 2019 11:58:06 -0800 Subject: [PATCH] auto-t: let testEAP-TTLS-MSCHAPv2 use HostapdCLI easier This test made it past the initial refactor to use HostapdCLI with the 'config' parameter. This avoids the need to iterate the hostapd map in the actual test. --- autotests/testEAP-TTLS-MSCHAPv2/connection_test.py | 9 +-------- autotests/testEAP-TTLS-MSCHAPv2/failure_test.py | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py b/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py index fb073dc9..66cc440b 100644 --- a/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py +++ b/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py @@ -11,18 +11,11 @@ from iwd import PSKAgent from iwd import NetworkType from hostapd import HostapdCLI -from hostapd import hostapd_map class Test(unittest.TestCase): def validate_connection(self, wd): - hostapd = None - - for hostapd_if in list(hostapd_map.values()): - hpd = HostapdCLI(hostapd_if) - if hpd.get_config_value('ssid') == 'ssidEAP-TTLS-MSCHAPv2': - hostapd = hpd - break + hostapd = HostapdCLI(config='ssidEAP-TTLS-MSCHAPv2.conf') self.assertIsNotNone(hostapd) diff --git a/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py b/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py index c91ce3c9..b4c3c003 100644 --- a/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py +++ b/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py @@ -11,18 +11,11 @@ from iwd import PSKAgent from iwd import NetworkType from hostapd import HostapdCLI -from hostapd import hostapd_map class Test(unittest.TestCase): def validate_connection(self, wd): - hostapd = None - - for hostapd_if in list(hostapd_map.values()): - hpd = HostapdCLI(hostapd_if) - if hpd.get_config_value('ssid') == 'ssidEAP-TTLS-MSCHAPv2': - hostapd = hpd - break + hostapd = HostapdCLI(config='ssidEAP-TTLS-MSCHAPv2.conf') self.assertIsNotNone(hostapd)