summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wipy/wlan/wlan.py10
-rw-r--r--tests/wipy/wlan/wlan.py.exp3
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/wipy/wlan/wlan.py b/tests/wipy/wlan/wlan.py
index 72a20d4fa..49e2e4af6 100644
--- a/tests/wipy/wlan/wlan.py
+++ b/tests/wipy/wlan/wlan.py
@@ -22,7 +22,7 @@ def wait_for_connection(wifi, timeout=10):
print('Connection failed!')
-wifi = WLAN()
+wifi = WLAN(0, WLAN.STA)
print(wifi.mode() == WLAN.STA)
print(wifi.antenna() == WLAN.INT_ANT)
@@ -103,7 +103,15 @@ print(wifi.isconnected() == False)
# test init again
wifi.init(WLAN.AP, ssid='www.wipy.io', auth=None, channel=5, antenna=WLAN.INT_ANT)
+print(wifi.mode() == WLAN.AP)
+
+# get the current instance without re-init
+wifi = WLAN()
+print(wifi.mode() == WLAN.AP)
+wifi = WLAN(0)
+print(wifi.mode() == WLAN.AP)
+# test the MAC address length
print(len(wifi.mac()) == 6)
# next ones MUST raise
diff --git a/tests/wipy/wlan/wlan.py.exp b/tests/wipy/wlan/wlan.py.exp
index 41253eab7..2bb3537a2 100644
--- a/tests/wipy/wlan/wlan.py.exp
+++ b/tests/wipy/wlan/wlan.py.exp
@@ -37,6 +37,9 @@ True
True
True
True
+True
+True
+True
Exception
Exception
Exception