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)
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")