aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2016-04-07 05:38:05 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-24 16:24:55 (GMT)
commit01703a9f2f9c662f8ad000b6476286a475431ad8 (patch)
tree1c458f97996cd6350916adc00b9f42a56af83354 /tests
parent84f3f3a5e6659319a134ef0a7ca18f4faf23f803 (diff)
downloadhostap-01703a9f2f9c662f8ad000b6476286a475431ad8.zip
hostap-01703a9f2f9c662f8ad000b6476286a475431ad8.tar.gz
hostap-01703a9f2f9c662f8ad000b6476286a475431ad8.tar.bz2
tests: Use hostapd.remove_bss() instead of HostapdGlobal() (WPS)
This makes ap_wps_twice more usable for testing with remote hosts. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_wps.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py
index aded40b..405b419 100644
--- a/tests/hwsim/test_ap_wps.py
+++ b/tests/hwsim/test_ap_wps.py
@@ -292,8 +292,7 @@ def test_ap_wps_twice(dev, apdev):
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
"wpa_passphrase": "12345678", "wpa": "2",
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" }
- hostapd.add_ap(apdev[0], params)
- hapd = hostapd.Hostapd(apdev[0]['ifname'])
+ hapd = hostapd.add_ap(apdev[0], params)
logger.info("WPS provisioning step")
hapd.request("WPS_PBC")
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
@@ -303,11 +302,9 @@ def test_ap_wps_twice(dev, apdev):
dev[0].request("DISCONNECT")
logger.info("Restart AP with different passphrase and re-run WPS")
- hapd_global = hostapd.HostapdGlobal()
- hapd_global.remove(apdev[0]['ifname'])
+ hostapd.remove_bss(apdev[0])
params['wpa_passphrase'] = 'another passphrase'
- hostapd.add_ap(apdev[0], params)
- hapd = hostapd.Hostapd(apdev[0]['ifname'])
+ hapd = hostapd.add_ap(apdev[0], params)
logger.info("WPS provisioning step")
hapd.request("WPS_PBC")
dev[0].dump_monitor()