def connect(self, ssid, password): if nm.get_connection_by_ssid(ssid): nm.del_connection_by_ssid(ssid) nm.make_connection_for(ssid, password) states.set_state('CONNECTING', [ssid, ssid])
def test_make_connection_for(monkeypatch): addconnection = Mock() monkeypatch.setattr("comitup.nm.nm.Settings.AddConnection", addconnection) nm.make_connection_for("anssid", "password") assert addconnection.called
def to_fn(ssid, password): if nm.get_connection_by_ssid(ssid): nm.del_connection_by_ssid(ssid) nm.make_connection_for(ssid, password) states.set_state('CONNECTING', [ssid, ssid]) return False
def to_fn(ssid, password): if nm.get_connection_by_ssid(ssid): nm.del_connection_by_ssid(ssid) nm.make_connection_for( ssid, password, link_local=conf.getboolean("ipv6_link_local") ) states.set_state("CONNECTING", [ssid, ssid]) return False