示例#1
0
 def start_wps(self):
     wpacli = WpaCli()
     if self.config.wps_mode == "pbc":
         wpacli.start_wps_pbc(self.wlandev)
     else:
         wpacli.set_wps_pin(self.wlandev, self.config.pin,
                            self.config.timeout)
示例#2
0
def test_wpacli_wps_pbc(monkeypatch):
    def mockreturn(self, *arg):
        assert arg == ('-i', 'w1p0', 'wps_pbc')
        return "OK"

    monkeypatch.setattr(WpaCli, "cmd", mockreturn)
    wpacli = WpaCli()
    wpacli.start_wps_pbc("w1p0")