diff options
author | danicampora <daniel@wipy.io> | 2015-10-19 20:53:02 +0200 |
---|---|---|
committer | danicampora <daniel@wipy.io> | 2015-10-19 21:17:15 +0200 |
commit | 9c72c71c05541b946feffb4d43fba6a5c513c9a7 (patch) | |
tree | d3a9a4f5307e439b1613f3299bda86960182bc3a /tests | |
parent | f4c50f1cfc766974374a8e58bd98e50bef8df3ba (diff) |
cc3200: WLAN class can retrieve the existing instance.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wipy/wlan/wlan.py | 10 | ||||
-rw-r--r-- | tests/wipy/wlan/wlan.py.exp | 3 |
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 |