3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 14:22:36 +01:00
iwd/autotests/util
James Prestwood 9d3d65a282 auto-t: add get_ordered_network(ssid)
This is a helper/shortcut to get_ordered_networks (plural). In nearly
all the autotests we had (roughly) the same block of code:

ordered_network = get_ordered_networks()[0]

self.assertNotEqual(ordered_network, None)
self.assertEqual(ordered_network.name, "someSsid")

Rather than having to do this, we can simplify and just have a single
call to get_ordered_network, which takes the SSID. If the SSID is not
found, we raise an exception. This avoids needing both asserts since
we are guarenteed that the return is valid and the SSID matches.

This also avoids possible issues with multiple networks showing up in
the GetOrderedNetworks call. Eventually test-runner will support running
tests on real wireless hardware, so its possible we could pick up
unexpected networks in the scan.
2018-12-14 13:46:32 -06:00
..
hlrauc.py autotest: fix possible hlrauc race condition 2018-01-18 14:43:53 -06:00
hostapd.py auto-t: removed ';' from many autotests 2018-12-14 13:46:23 -06:00
hwsim.py auto-t: removed ';' from many autotests 2018-12-14 13:46:23 -06:00
iwd.py auto-t: add get_ordered_network(ssid) 2018-12-14 13:46:32 -06:00
ofono.py autotest: Added ofono.py utility 2017-12-14 17:47:29 -06:00
testutil.py autotests: Test operstate is IF_OPER_UP when state == connected 2017-05-30 17:08:36 -05:00
wiphy.py autotests: Add utility script to parse interface configuration 2017-03-28 15:31:59 -05:00