Added unit-tests for background updates
[zeroinstall/solver.git] / tests / my_dbus.py
bloba4738584f229a24bb86442547f8b01258d1e6f82
1 user_callback = None # Invoked in a callback when a question box is displayed
3 class SessionBus:
4 def get_object(self, service, path):
5 return None
7 class Interface:
8 def __init__(self, obj, iface):
9 self.callback = {}
10 self.boxes = []
12 def GetCapabilities(self):
13 pass
15 def Notify(self, *args):
16 self.boxes.append(args)
17 nid = len(self.boxes)
19 app, replaces_id, icon, title, message, actions, hints, timeout = args
21 if actions:
22 user_callback(self.callback['ActionInvoked'], nid, actions)
24 return nid
26 def connect_to_signal(self, signal, callback):
27 self.callback[signal] = callback
29 class Byte:
30 def __init__(self, value):
31 pass