def test_wifi_rescan_when_raise_error(): c = DummyDeviceControl(raise_error=Exception) with pytest.raises(Exception): c.wifi_rescan()
def test_wifi_rescan(): c = DummyDeviceControl() ifname = 'wlan0' ssid = 'ssid' c.wifi_rescan(ifname, ssid) assert c.wifi_rescan_args == [(ifname, ssid)]