3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-10 14:09:22 +01:00

autotests: Replace strings with constants

This commit is contained in:
Tim Kourt 2016-06-03 16:13:44 -07:00 committed by Denis Kenzior
parent c2751ad6a2
commit 16839f2ca0

View File

@ -19,8 +19,8 @@ def defineAgentVars():
global manager, pathAgent global manager, pathAgent
bus = dbus.SystemBus() bus = dbus.SystemBus()
pathAgent = "/utility/agent/" + str(randrange(100)) pathAgent = "/utility/agent/" + str(randrange(100))
manager = dbus.Interface(bus.get_object('net.connman.iwd', "/"), manager = dbus.Interface(bus.get_object(utility.IWD_SERVICE, "/"),
'net.connman.iwd.AgentManager') utility.IWD_AGENT_MANAGER_INTERFACE)
def getManager(): def getManager():
return manager return manager
@ -29,13 +29,13 @@ def getPathAgent():
return pathAgent return pathAgent
class Agent(dbus.service.Object): class Agent(dbus.service.Object):
@dbus.service.method("net.connman.iwd.Agent", @dbus.service.method(utility.IWD_AGENT_INTERFACE,
in_signature='', out_signature='') in_signature='', out_signature='')
def Release(self): def Release(self):
logger.debug("Release") logger.debug("Release")
mainloop.quit() mainloop.quit()
@dbus.service.method("net.connman.iwd.Agent", @dbus.service.method(utility.IWD_AGENT_INTERFACE,
in_signature='o', in_signature='o',
out_signature='s') out_signature='s')
def RequestPassphrase(self, path): def RequestPassphrase(self, path):