mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 05:39:24 +01:00
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.
This commit is contained in:
parent
0c586dc8ca
commit
c961dafc50
@ -11,18 +11,11 @@ from iwd import PSKAgent
|
|||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
|
|
||||||
from hostapd import HostapdCLI
|
from hostapd import HostapdCLI
|
||||||
from hostapd import hostapd_map
|
|
||||||
|
|
||||||
class Test(unittest.TestCase):
|
class Test(unittest.TestCase):
|
||||||
|
|
||||||
def validate_connection(self, wd):
|
def validate_connection(self, wd):
|
||||||
hostapd = None
|
hostapd = HostapdCLI(config='ssidEAP-TTLS-MSCHAPv2.conf')
|
||||||
|
|
||||||
for hostapd_if in list(hostapd_map.values()):
|
|
||||||
hpd = HostapdCLI(hostapd_if)
|
|
||||||
if hpd.get_config_value('ssid') == 'ssidEAP-TTLS-MSCHAPv2':
|
|
||||||
hostapd = hpd
|
|
||||||
break
|
|
||||||
|
|
||||||
self.assertIsNotNone(hostapd)
|
self.assertIsNotNone(hostapd)
|
||||||
|
|
||||||
|
@ -11,18 +11,11 @@ from iwd import PSKAgent
|
|||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
|
|
||||||
from hostapd import HostapdCLI
|
from hostapd import HostapdCLI
|
||||||
from hostapd import hostapd_map
|
|
||||||
|
|
||||||
class Test(unittest.TestCase):
|
class Test(unittest.TestCase):
|
||||||
|
|
||||||
def validate_connection(self, wd):
|
def validate_connection(self, wd):
|
||||||
hostapd = None
|
hostapd = HostapdCLI(config='ssidEAP-TTLS-MSCHAPv2.conf')
|
||||||
|
|
||||||
for hostapd_if in list(hostapd_map.values()):
|
|
||||||
hpd = HostapdCLI(hostapd_if)
|
|
||||||
if hpd.get_config_value('ssid') == 'ssidEAP-TTLS-MSCHAPv2':
|
|
||||||
hostapd = hpd
|
|
||||||
break
|
|
||||||
|
|
||||||
self.assertIsNotNone(hostapd)
|
self.assertIsNotNone(hostapd)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user