mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-16 23:40:43 +01:00
autotests: Replace strings with constants
This commit is contained in:
parent
16839f2ca0
commit
2b1e820062
@ -30,9 +30,10 @@ class TestConnectDisconnect(unittest.TestCase):
|
|||||||
# start simpleAgent
|
# start simpleAgent
|
||||||
proc = Popen([sys.executable, '../utility/simpleAgent.py'])
|
proc = Popen([sys.executable, '../utility/simpleAgent.py'])
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
network = dbus.Interface(bus.get_object("net.connman.iwd",
|
network = dbus.Interface(bus.get_object(utility.IWD_SERVICE,
|
||||||
networkToConnect),
|
networkToConnect),
|
||||||
"net.connman.iwd.Network")
|
utility.IWD_NETWORK_INTERFACE)
|
||||||
|
|
||||||
status = utility.connect(networkToConnect, self, mainloop, bus)
|
status = utility.connect(networkToConnect, self, mainloop, bus)
|
||||||
|
|
||||||
if status == False:
|
if status == False:
|
||||||
@ -65,11 +66,12 @@ class TestConnectDisconnect(unittest.TestCase):
|
|||||||
def test_connectDisconnect(self):
|
def test_connectDisconnect(self):
|
||||||
logger.info(sys._getframe().f_code.co_name)
|
logger.info(sys._getframe().f_code.co_name)
|
||||||
while (True):
|
while (True):
|
||||||
if bus.name_has_owner('net.connman.iwd') == True:
|
if bus.name_has_owner(utility.IWD_SERVICE) == True:
|
||||||
break
|
break
|
||||||
self.doConnectDisconnect()
|
self.doConnectDisconnect()
|
||||||
#watch doesn't seem to work. So used name_has_owner
|
#watch doesn't seem to work. So used name_has_owner
|
||||||
#watch = bus.watch_name_owner("net.connman.iwd",self.doConnectDisconnect)
|
#watch = bus.watch_name_owner(utility.IWD_SERVICE,
|
||||||
|
# self.doConnectDisconnect)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user