mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 17:59:25 +01:00
auto-t: update tests to use get_ordered_network call
This commit is contained in:
parent
9d3d65a282
commit
74599ce33d
@ -24,16 +24,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(dev, condition)
|
||||
|
||||
ordered_networks = dev.get_ordered_networks()
|
||||
ordered_network = dev.get_ordered_network('TestAP1')
|
||||
|
||||
ordered_network = None
|
||||
for network in ordered_networks:
|
||||
if network.name == 'TestAP1':
|
||||
ordered_network = network
|
||||
break
|
||||
|
||||
self.assertNotEqual(ordered_network, None)
|
||||
self.assertEqual(ordered_network.name, 'TestAP1')
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
psk_agent = PSKAgent('Password1')
|
||||
|
@ -24,16 +24,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(dev, condition)
|
||||
|
||||
ordered_networks = dev.get_ordered_networks()
|
||||
ordered_network = dev.get_ordered_network('TestAP1')
|
||||
|
||||
ordered_network = None
|
||||
for network in ordered_networks:
|
||||
if network.name == 'TestAP1':
|
||||
ordered_network = network
|
||||
break
|
||||
|
||||
self.assertNotEqual(ordered_network, None)
|
||||
self.assertEqual(ordered_network.name, 'TestAP1')
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
psk_agent = PSKAgent('Password1')
|
||||
|
@ -59,10 +59,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('TestAPRoam')
|
||||
|
||||
self.assertEqual(ordered_network.name, "TestAPRoam")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -28,10 +28,9 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
o_net = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidOpen')
|
||||
|
||||
o_net.network_object.connect()
|
||||
ordered_network.network_object.connect()
|
||||
|
||||
condition = 'obj.state == DeviceState.connected'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
@ -32,10 +32,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-AKA')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-AKA")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -32,10 +32,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-AKA')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-AKA")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -27,10 +27,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-AKA')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-AKA")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -40,10 +40,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-AKA')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-AKA")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -34,12 +34,9 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
network = None
|
||||
for ordered_network in device.get_ordered_networks():
|
||||
if ordered_network.name == ssid:
|
||||
network = ordered_network
|
||||
break
|
||||
self.assertEqual(network.type, NetworkType.eap)
|
||||
ordered_network = device.get_ordered_network(ssid)
|
||||
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
@ -26,10 +26,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PEAPv1-GTC-nosecret')
|
||||
|
||||
self.assertEqual(ordered_network.name, 'ssidEAP-PEAPv1-GTC-nosecret')
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -25,10 +25,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PEAPv1-GTC')
|
||||
|
||||
self.assertEqual(ordered_network.name, 'ssidEAP-PEAPv1-GTC')
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -25,10 +25,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PEAP-MSCHAPv2')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-PEAP-MSCHAPv2")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -24,10 +24,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PEAP-SIM')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-PEAP-SIM")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -12,8 +12,6 @@ from iwd import NetworkType
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def validate_connection(self, wd):
|
||||
ssid_to_connect = 'ssidEAP-PEAP-frag'
|
||||
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
@ -26,15 +24,7 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = None
|
||||
|
||||
for o_n in ordered_networks:
|
||||
if o_n.name == ssid_to_connect:
|
||||
ordered_network = o_n
|
||||
break
|
||||
|
||||
self.assertEqual(ordered_network.name, ssid_to_connect)
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PEAP-frag')
|
||||
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
|
@ -12,8 +12,6 @@ from iwd import NetworkType
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def validate_connection(self, wd):
|
||||
ssid_to_connect = 'ssidEAP-PEAPv0'
|
||||
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
@ -26,15 +24,7 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = None
|
||||
|
||||
for o_n in ordered_networks:
|
||||
if o_n.name == ssid_to_connect:
|
||||
ordered_network = o_n
|
||||
break
|
||||
|
||||
self.assertEqual(ordered_network.name, ssid_to_connect)
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PEAPv0')
|
||||
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
|
@ -12,8 +12,6 @@ from iwd import NetworkType
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def validate_connection(self, wd):
|
||||
ssid_to_connect = 'ssidEAP-PEAPv1'
|
||||
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
@ -26,15 +24,7 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = None
|
||||
|
||||
for o_n in ordered_networks:
|
||||
if o_n.name == ssid_to_connect:
|
||||
ordered_network = o_n
|
||||
break
|
||||
|
||||
self.assertEqual(ordered_network.name, ssid_to_connect)
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PEAPv1')
|
||||
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
|
@ -42,15 +42,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = None
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PWD')
|
||||
|
||||
for o_n in ordered_networks:
|
||||
if o_n.name == "ssidEAP-PWD":
|
||||
ordered_network = o_n
|
||||
break
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-PWD")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -23,15 +23,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = None
|
||||
ordered_network = device.get_ordered_network('ssidEAP-PWD-frag')
|
||||
|
||||
for o_n in ordered_networks:
|
||||
if o_n.name == 'ssidEAP-PWD-frag':
|
||||
ordered_network = o_n
|
||||
break
|
||||
|
||||
self.assertEqual(ordered_network.name, 'ssidEAP-PWD-frag')
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -32,10 +32,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-SIM')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-SIM")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -38,10 +38,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-SIM')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-SIM")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -24,10 +24,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TLS')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TLS")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -39,8 +39,7 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = [n for n in ordered_networks if n.name == ssid][0]
|
||||
ordered_network = device.get_ordered_network(ssid)
|
||||
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
|
@ -24,10 +24,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TLS')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TLS")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -24,10 +24,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TLS')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TLS")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -41,10 +41,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TTLS-CHAP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TTLS-CHAP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -31,10 +31,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TTLS')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TTLS")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -24,10 +24,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TTLS')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TTLS")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -41,10 +41,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TTLS-MSCHAP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TTLS-MSCHAP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -41,10 +41,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TTLS-PAP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TTLS-PAP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -25,10 +25,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidEAP-TTLS')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidEAP-TTLS")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -43,11 +43,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = device.get_ordered_network('TestFT')
|
||||
|
||||
self.assertEqual(len(ordered_networks), 1)
|
||||
ordered_network = ordered_networks[0]
|
||||
self.assertEqual(ordered_network.name, "TestFT")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
self.assertEqual(ordered_network.signal_strength, -2000)
|
||||
|
||||
|
@ -47,11 +47,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = device.get_ordered_network('TestFT')
|
||||
|
||||
self.assertEqual(len(ordered_networks), 1)
|
||||
ordered_network = ordered_networks[0]
|
||||
self.assertEqual(ordered_network.name, "TestFT")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
self.assertEqual(ordered_network.signal_strength, -2000)
|
||||
|
||||
|
@ -52,11 +52,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = device.get_ordered_network('TestFT')
|
||||
|
||||
self.assertEqual(len(ordered_networks), 1)
|
||||
ordered_network = ordered_networks[0]
|
||||
self.assertEqual(ordered_network.name, "TestFT")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
self.assertEqual(ordered_network.signal_strength, -2000)
|
||||
|
||||
|
@ -30,10 +30,8 @@ class TestConnectAutoconnect(unittest.TestCase):
|
||||
condition = 'obj.connected_network is not None'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_network = device.get_ordered_networks()[0]
|
||||
ordered_network = device.get_ordered_network(ssid)
|
||||
|
||||
self.assertIsNotNone(ordered_network)
|
||||
self.assertEqual(ordered_network.name, ssid)
|
||||
self.assertTrue(ordered_network.network_object.connected)
|
||||
|
||||
device.disconnect()
|
||||
|
@ -22,10 +22,7 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidNew")
|
||||
ordered_network = device.get_ordered_network('ssidNew')
|
||||
|
||||
condition = 'not obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
@ -31,15 +31,7 @@ class TestMFP(unittest.TestCase):
|
||||
'''
|
||||
|
||||
def check_mfp_connection(self, wd, device, ssid, throws_exception):
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = None
|
||||
|
||||
for o_n in ordered_networks:
|
||||
if o_n.name == ssid:
|
||||
ordered_network = o_n
|
||||
break
|
||||
|
||||
self.assertEqual(ordered_network.name, ssid)
|
||||
ordered_network = device.get_ordered_network(ssid)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
@ -25,10 +25,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidOWE')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidOWE")
|
||||
self.assertEqual(ordered_network.type, NetworkType.open)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -25,10 +25,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidOpen')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidOpen")
|
||||
self.assertEqual(ordered_network.type, NetworkType.open)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -79,11 +79,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = device.get_ordered_network('TestPreauth')
|
||||
|
||||
self.assertEqual(len(ordered_networks), 1)
|
||||
ordered_network = ordered_networks[0]
|
||||
self.assertEqual(ordered_network.name, "TestPreauth")
|
||||
self.assertEqual(ordered_network.type, NetworkType.eap)
|
||||
self.assertEqual(ordered_network.signal_strength, -2500)
|
||||
|
||||
|
@ -41,11 +41,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = device.get_ordered_network('TestOpen')
|
||||
|
||||
self.assertEqual(len(ordered_networks), 1)
|
||||
ordered_network = ordered_networks[0]
|
||||
self.assertEqual(ordered_network.name, "TestOpen")
|
||||
self.assertEqual(ordered_network.type, NetworkType.open)
|
||||
self.assertEqual(ordered_network.signal_strength, -4000)
|
||||
|
||||
|
@ -26,23 +26,19 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = device.get_ordered_network('ssidSAE')
|
||||
|
||||
network = [x for x in ordered_networks if x.name == "ssidSAE"][0]
|
||||
|
||||
self.assertIsNotNone(network)
|
||||
self.assertEqual(network.name, "ssidSAE")
|
||||
self.assertEqual(network.type, NetworkType.psk)
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'obj.connected'
|
||||
wd.wait_for_object_condition(network.network_object, condition)
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
device.wait_for_connected()
|
||||
|
||||
device.disconnect()
|
||||
|
||||
condition = 'not obj.connected'
|
||||
wd.wait_for_object_condition(network.network_object, condition)
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
del wd
|
||||
|
||||
|
@ -33,13 +33,8 @@ class Test(unittest.TestCase):
|
||||
wd.wait_for_object_condition(d, condition)
|
||||
|
||||
for i in range(len(devices)):
|
||||
ordered_networks = devices[i].get_ordered_networks()
|
||||
network = devices[i].get_ordered_network('ssidSAE-Clogging')
|
||||
|
||||
network = [x for x in ordered_networks
|
||||
if x.name == "ssidSAE-Clogging"][0]
|
||||
|
||||
self.assertIsNotNone(network)
|
||||
self.assertEqual(network.name, "ssidSAE-Clogging")
|
||||
self.assertEqual(network.type, NetworkType.psk)
|
||||
|
||||
networks.append(network)
|
||||
|
@ -37,12 +37,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
network = device.get_ordered_network('ssidSAE')
|
||||
|
||||
network = [x for x in ordered_networks if x.name == "ssidSAE"][0]
|
||||
|
||||
self.assertIsNotNone(network)
|
||||
self.assertEqual(network.name, "ssidSAE")
|
||||
self.assertEqual(network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -29,12 +29,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
network = device.get_ordered_network('ssidSAE')
|
||||
|
||||
network = [x for x in ordered_networks if x.name == "ssidSAE"][0]
|
||||
|
||||
self.assertIsNotNone(network)
|
||||
self.assertEqual(network.name, "ssidSAE")
|
||||
self.assertEqual(network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -48,10 +48,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidCCMP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidCCMP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -41,10 +41,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidCCMP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidCCMP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -29,10 +29,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidTKIP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidTKIP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -28,10 +28,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidCCMP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidCCMP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -29,10 +29,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidCCMP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidCCMP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -30,10 +30,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidCCMP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidCCMP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -28,10 +28,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
ordered_networks = device.get_ordered_networks()
|
||||
ordered_network = ordered_networks[0]
|
||||
ordered_network = device.get_ordered_network('ssidCCMP')
|
||||
|
||||
self.assertEqual(ordered_network.name, "ssidCCMP")
|
||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
Loading…
Reference in New Issue
Block a user