Beispiel #1
0
    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])
Beispiel #2
0
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
Beispiel #3
0
        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
Beispiel #4
0
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
Beispiel #5
0
        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