def test_make_hotspot(monkeypatch): addconnection = Mock() monkeypatch.setattr("comitup.nm.nm.Settings.AddConnection", addconnection) nm.make_hotspot() assert addconnection.called
def assure_hotspot(ssid: str, device: NetworkManager.Device, password: str) -> None: nm.del_connection_by_ssid(ssid) if not nm.get_connection_by_ssid(ssid): nm.make_hotspot(ssid, device, password)
def assure_hotspot(ssid, device): log.debug("states: Calling nm.get_connection_by_ssid()") if not nm.get_connection_by_ssid(ssid): nm.make_hotspot(ssid, device)