Exemple #1
0
def test_wpacli_p2p_group_add(monkeypatch):
    def mockreturn(self, *arg):
        assert arg == ("p2p_group_add", 'persistent=42')
        return "OK"

    monkeypatch.setattr(WpaCli, "cmd", mockreturn)
    wpacli = WpaCli()
    wpacli.p2p_group_add("42")
Exemple #2
0
 def create_p2p_interface(self, R2):
     wpacli = WpaCli()
     wpacli.start_p2p_find()
     wpacli.set_device_name(self.config.device_name)
     wpacli.set_device_type(self.config.device_type)
     wpacli.set_p2p_go_ht40()
     wpacli.wfd_subelem_set(0, self.wfd_devinfo())
     wpacli.wfd_subelem_set(1, self.wfd_bssid(0))
     wpacli.wfd_subelem_set(6, self.wfd_sink_info(0, 0))
     wpacli.wfd_subelem_set(7, self.wfd_ext_cap(uibc=False, i2c=False))
     if R2:
         wpacli.wfd_subelem_set(11, self.wfd_devinfo2())
     wpacli.p2p_group_add(self.config.group_name)