3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

auto-t EAP-PEAP

1) Refactored to start catching the exceptions and properly
   dispose an instance of iwd
2) Switched to list_devices with wait option
This commit is contained in:
Tim Kourt 2018-05-21 13:35:06 -07:00 committed by Denis Kenzior
parent b3b0c3dea5
commit 342ffc5652
3 changed files with 33 additions and 18 deletions

View File

@ -11,14 +11,10 @@ from iwd import NetworkType
class Test(unittest.TestCase):
def test_connection_success(self):
def validate_connection(self, wd):
ssid_to_connect = 'ssidEAP-PEAP-frag'
wd = IWD(True, '/tmp/IWD-Frag')
wd.wait(1)
devices = wd.list_devices();
devices = wd.list_devices(True);
self.assertIsNotNone(devices)
device = devices[0]
@ -55,6 +51,15 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
def test_connection_success(self):
wd = IWD(True, '/tmp/IWD-Frag')
try:
self.validate_connection(wd)
except:
del wd
raise
del wd
@classmethod

View File

@ -11,14 +11,10 @@ from iwd import NetworkType
class Test(unittest.TestCase):
def test_connection_success(self):
def validate_connection(self, wd):
ssid_to_connect = 'ssidEAP-PEAPv0'
wd = IWD(True)
wd.wait(1)
devices = wd.list_devices();
devices = wd.list_devices(True);
self.assertIsNotNone(devices)
device = devices[0]
@ -55,6 +51,15 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
def test_connection_success(self):
wd = IWD(True)
try:
self.validate_connection(wd)
except:
del wd
raise
del wd
@classmethod

View File

@ -11,14 +11,10 @@ from iwd import NetworkType
class Test(unittest.TestCase):
def test_connection_success(self):
def validate_connection(self, wd):
ssid_to_connect = 'ssidEAP-PEAPv1'
wd = IWD(True)
wd.wait(1)
devices = wd.list_devices();
devices = wd.list_devices(True);
self.assertIsNotNone(devices)
device = devices[0]
@ -55,6 +51,15 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
def test_connection_success(self):
wd = IWD(True)
try:
self.validate_connection(wd)
except:
del wd
raise
del wd
@classmethod