예제 #1
0
파일: test_nm.py 프로젝트: ds1019/comitup
def test_make_hotspot(monkeypatch):
    addconnection = Mock()
    monkeypatch.setattr("comitup.nm.nm.Settings.AddConnection", addconnection)

    nm.make_hotspot()

    assert addconnection.called
예제 #2
0
def test_make_hotspot(monkeypatch):
    addconnection = Mock()
    monkeypatch.setattr("comitup.nm.nm.Settings.AddConnection", addconnection)

    nm.make_hotspot()

    assert addconnection.called
예제 #3
0
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)
예제 #4
0
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)