Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-04-26 02:37:35 (GMT)
committer Dan Williams <dcbw@redhat.com>2007-04-26 02:37:35 (GMT)
commit549a2df40347b20a81de30e90e9f35f6e344a66d (patch)
tree8a868eb275a34fa41fe9278cf54f14332205d923 /tests
parent6d8fd267e2f87b53822d45d14f2457b2b7becc57 (diff)
Make joining work
Diffstat (limited to 'tests')
-rwxr-xr-xtests/presence/mockps.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/presence/mockps.py b/tests/presence/mockps.py
index 25a311a..6f2f9c7 100755
--- a/tests/presence/mockps.py
+++ b/tests/presence/mockps.py
@@ -28,7 +28,8 @@ _ACTIVITY_PATH = "/org/laptop/Sugar/Presence/Activities/"
_ACTIVITY_INTERFACE = "org.laptop.Sugar.Presence.Activity"
class TestActivity(dbus.service.Object):
- def __init__(self, bus_name, object_id, actid, name, color, atype, properties):
+ def __init__(self, bus_name, object_id, parent, actid, name, color, atype, properties):
+ self._parent = parent
self._actid = actid
self._aname = name
self._color = color
@@ -93,7 +94,9 @@ class TestActivity(dbus.service.Object):
@dbus.service.method(_ACTIVITY_INTERFACE)
def Join(self):
- pass
+ owner = self._parent._owner
+ self.add_buddy(owner)
+ owner.add_activity(self)
@dbus.service.method(_ACTIVITY_INTERFACE, out_signature="ao")
def GetJoinedBuddies(self):
@@ -311,7 +314,7 @@ class TestPresenceService(dbus.service.Object):
objid = self._get_next_object_id()
if not color:
color = self._owner._color
- act = TestActivity(self._bus_name, objid, actid, name, color, atype, properties)
+ act = TestActivity(self._bus_name, objid, self, actid, name, color, atype, properties)
self._activities[actid] = act
self.ActivityAppeared(act._object_path)
return act