mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-11 10:12:42 +01:00
auto-t: removed ';' from many autotests
At some point a stray ';' got added into an autotest in a section of code that is heavily copy pasted. So in turn nearly all the autotests have this stray ';' after list_devices (and a few in other places).
This commit is contained in:
parent
c2094c5e04
commit
699b83cb1f
@ -48,7 +48,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -60,7 +60,7 @@ class TestConnectAutoconnect(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -17,7 +17,7 @@ class Test(unittest.TestCase):
|
||||
def test_disconnect(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
hostapd_if = list(hostapd_map.values())[0]
|
||||
|
@ -21,7 +21,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -21,7 +21,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -16,7 +16,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -29,7 +29,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -16,7 +16,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = iwd.PSKAgent(*secrets)
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
try:
|
||||
|
@ -13,7 +13,7 @@ from iwd import PSKAgent
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def validate_connection(self, wd):
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
@ -12,7 +12,7 @@ from iwd import NetworkType
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def validate_connection(self, wd):
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
@ -12,7 +12,7 @@ from hlrauc import AuthCenter
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
def validate_connection(self, wd):
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -14,7 +14,7 @@ class Test(unittest.TestCase):
|
||||
def validate_connection(self, wd):
|
||||
ssid_to_connect = 'ssidEAP-PEAP-frag'
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -14,7 +14,7 @@ class Test(unittest.TestCase):
|
||||
def validate_connection(self, wd):
|
||||
ssid_to_connect = 'ssidEAP-PEAPv0'
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -14,7 +14,7 @@ class Test(unittest.TestCase):
|
||||
def validate_connection(self, wd):
|
||||
ssid_to_connect = 'ssidEAP-PEAPv1'
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -30,7 +30,7 @@ class Test(unittest.TestCase):
|
||||
'secret123'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -11,7 +11,7 @@ from iwd import NetworkType
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def validate_connection(self, wd):
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -27,7 +27,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -13,7 +13,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -26,7 +26,7 @@ class Test(unittest.TestCase):
|
||||
hostapd_ifname = ifname
|
||||
break
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -13,7 +13,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -13,7 +13,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -31,7 +31,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent('abc', ('user', 'testpasswd'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
@ -18,7 +18,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent('abc', ('user', 'testpasswd'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -13,7 +13,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -31,7 +31,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent('abc', ('user', 'testpasswd'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
@ -31,7 +31,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent('abc', ('user', 'testpasswd'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
@ -14,7 +14,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -16,7 +16,7 @@ class Test(unittest.TestCase):
|
||||
def test_push_button_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
device.wps_push_button()
|
||||
|
@ -18,7 +18,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
device.wps_push_button()
|
||||
@ -34,7 +34,7 @@ class Test(unittest.TestCase):
|
||||
def test_pin_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
pin = device.wps_generate_pin()
|
||||
self.hostapd.wps_pin(pin)
|
||||
@ -52,7 +52,7 @@ class Test(unittest.TestCase):
|
||||
def test_4_digit_pin_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
pin = '1234'
|
||||
self.hostapd.wps_pin(pin)
|
||||
|
@ -26,7 +26,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2000
|
||||
@ -107,7 +107,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2000
|
||||
|
@ -30,7 +30,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("EasilyGuessedPassword")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2000
|
||||
@ -116,7 +116,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("EasilyGuessedPassword")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2000
|
||||
|
@ -47,7 +47,7 @@ class TestConnectAutoconnect(unittest.TestCase):
|
||||
psk_agent = PSKAgent(["secret123"], ('domain\\User', 'Password'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -10,7 +10,7 @@ from iwd import IWD
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def connect_to_new_network(self, wd):
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -65,7 +65,7 @@ class TestMFP(unittest.TestCase):
|
||||
psk_agent = PSKAgent( ['secret123', 'secret123', 'secret123'] )
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -14,7 +14,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -62,7 +62,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2500
|
||||
|
@ -23,7 +23,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
device = wd.list_devices(1)[0];
|
||||
device = wd.list_devices(1)[0]
|
||||
|
||||
# Register agent early to catch any unexpected notifications
|
||||
agent = TstAgent()
|
||||
|
@ -37,7 +37,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -30,7 +30,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -21,7 +21,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
def set_network(self, ssid):
|
||||
if ssid not in self.dict:
|
||||
return;
|
||||
return
|
||||
|
||||
if self.dict[ssid]:
|
||||
raise Exception('Duplicated list entry')
|
||||
@ -29,7 +29,7 @@ class Test(unittest.TestCase):
|
||||
self.dict[ssid] = True
|
||||
|
||||
def validate_scan(self, wd):
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -23,7 +23,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
def set_network(self, ssid):
|
||||
if ssid not in self.dict:
|
||||
return;
|
||||
return
|
||||
|
||||
if self.dict[ssid]:
|
||||
raise Exception('Duplicated list entry')
|
||||
@ -31,7 +31,7 @@ class Test(unittest.TestCase):
|
||||
self.dict[ssid] = True
|
||||
|
||||
def validate_scan(self, wd):
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -18,7 +18,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -17,7 +17,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -18,7 +18,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -18,7 +18,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("InvalidPassword")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
|
@ -15,7 +15,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
device.disconnect()
|
||||
|
@ -17,7 +17,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices(1);
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -109,7 +109,7 @@ class HostapdCLI:
|
||||
if wname == self.ifname:
|
||||
with open(hostapd_map[wname].config, 'r') as f:
|
||||
# read in config file and search for key
|
||||
cfg = f.read();
|
||||
cfg = f.read()
|
||||
match = re.search(r'%s=.*' % key, cfg)
|
||||
if match:
|
||||
return match.group(0).split('=')[1]
|
||||
@ -131,7 +131,7 @@ class HostapdCLI:
|
||||
os.system('ifconfig %s up' % intf.name)
|
||||
os.system('hostapd -g %s -i %s %s &' %
|
||||
(intf.ctrl_interface, intf.name, intf.config))
|
||||
break;
|
||||
break
|
||||
|
||||
# set flag so hostapd can be killed after the test
|
||||
self._hostapd_restarted = True
|
||||
|
@ -26,7 +26,7 @@ class HwsimDBusAbstract(iwd.AsyncOpAbstract):
|
||||
self._object_path = object_path
|
||||
proxy = self._bus.get_object(HWSIM_SERVICE, self._object_path)
|
||||
self._iface = dbus.Interface(proxy, self._iface_name)
|
||||
self._prop_proxy = dbus.Interface(proxy, iwd.DBUS_PROPERTIES);
|
||||
self._prop_proxy = dbus.Interface(proxy, iwd.DBUS_PROPERTIES)
|
||||
|
||||
if properties is None:
|
||||
self._properties = self._prop_proxy.GetAll(self._iface_name)
|
||||
|
@ -127,7 +127,7 @@ class IWDDBusAbstract(AsyncOpAbstract):
|
||||
self._object_path = object_path
|
||||
proxy = self._bus.get_object(IWD_SERVICE, self._object_path)
|
||||
self._iface = dbus.Interface(proxy, self._iface_name)
|
||||
self._prop_proxy = dbus.Interface(proxy, DBUS_PROPERTIES);
|
||||
self._prop_proxy = dbus.Interface(proxy, DBUS_PROPERTIES)
|
||||
|
||||
if properties is None:
|
||||
self._properties = self._prop_proxy.GetAll(self._iface_name)
|
||||
@ -930,7 +930,7 @@ class IWD(AsyncOpAbstract):
|
||||
def create_in_storage(file_name, file_content):
|
||||
fo = open(IWD_STORAGE_DIR + '/' + file_name, 'w')
|
||||
|
||||
fo.write(file_content);
|
||||
fo.write(file_content)
|
||||
fo.close()
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user