Example #1
0
def test_wifi():
    result_wifi = [
        DeviceWifi(False, 'ssid', '00:00:00:00:00:00', 'Infra', 1, 2400, 54,
                   78, 'WPA2')
    ]
    c = DummyDeviceControl(result_wifi=result_wifi)
    assert c.wifi() == result_wifi
    ifname = 'wlan0'
    assert c.wifi(ifname) == result_wifi
    assert c.wifi_args == [ifname]
Example #2
0
def test_wifi_when_raise_error():
    c = DummyDeviceControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.wifi()
Example #3
0
def test_wifi():
    result_wifi = [DeviceWifi(False, 'ssid', 'Infra', 1, 54, 78, 'WPA2')]
    c = DummyDeviceControl(result_wifi=result_wifi)
    assert c.wifi() == result_wifi