[Telepathy-commits] [telepathy-gabble/master] Twisted tests: stop using ProxyObject._named_service, it isn't API and never has been

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:32 PDT 2008


20080722104208-53eee-3d2d7e4231a1066a4bcce599dc86ba31f9790a95.gz
---
 tests/twisted/muc/test-muc-properties.py      |    2 +-
 tests/twisted/roster/groups-12791.py          |    4 ++--
 tests/twisted/roster/groups.py                |    4 ++--
 tests/twisted/roster/test-google-roster.py    |    2 +-
 tests/twisted/roster/test-roster-subscribe.py |    2 +-
 tests/twisted/roster/test-roster.py           |    2 +-
 tests/twisted/text/test-text.py               |    2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/tests/twisted/muc/test-muc-properties.py b/tests/twisted/muc/test-muc-properties.py
index ad295d8..075f589 100644
--- a/tests/twisted/muc/test-muc-properties.py
+++ b/tests/twisted/muc/test-muc-properties.py
@@ -94,7 +94,7 @@ def expect_members_changed2(event, data):
 def expect_request_channel_return(event, data):
     bus = data['conn']._bus
     data['text_chan'] = bus.get_object(
-        data['conn']._named_service, event.value[0])
+        data['conn'].bus_name, event.value[0])
 
     props_iface = dbus.Interface(data['text_chan'],
         'org.freedesktop.Telepathy.Properties')
diff --git a/tests/twisted/roster/groups-12791.py b/tests/twisted/roster/groups-12791.py
index 239f51c..7c659f8 100644
--- a/tests/twisted/roster/groups-12791.py
+++ b/tests/twisted/roster/groups-12791.py
@@ -18,7 +18,7 @@ def _expect_contact_list_channel(q, bus, conn, name, contacts):
     assert handle_type == HT_CONTACT_LIST, handle_type
     inspected = conn.InspectHandles(handle_type, [handle])[0]
     assert inspected == name, (inspected, name)
-    chan = bus.get_object(conn._named_service, path)
+    chan = bus.get_object(conn.bus_name, path)
     group_iface = dbus.Interface(chan,
         u'org.freedesktop.Telepathy.Channel.Interface.Group')
     inspected = conn.InspectHandles(1, group_iface.GetMembers())
@@ -31,7 +31,7 @@ def _expect_group_channel(q, bus, conn, name, contacts):
     assert handle_type == HT_GROUP, handle_type
     inspected = conn.InspectHandles(handle_type, [handle])[0]
     assert inspected == name, (inspected, name)
-    chan = bus.get_object(conn._named_service, path)
+    chan = bus.get_object(conn.bus_name, path)
     group_iface = dbus.Interface(chan,
         u'org.freedesktop.Telepathy.Channel.Interface.Group')
     inspected = conn.InspectHandles(1, group_iface.GetMembers())
diff --git a/tests/twisted/roster/groups.py b/tests/twisted/roster/groups.py
index 0915ee4..419170d 100644
--- a/tests/twisted/roster/groups.py
+++ b/tests/twisted/roster/groups.py
@@ -18,7 +18,7 @@ def _expect_contact_list_channel(q, bus, conn, name, contacts):
     assert handle_type == HT_CONTACT_LIST, handle_type
     inspected = conn.InspectHandles(handle_type, [handle])[0]
     assert inspected == name, (inspected, name)
-    chan = bus.get_object(conn._named_service, path)
+    chan = bus.get_object(conn.bus_name, path)
     group_iface = dbus.Interface(chan,
         u'org.freedesktop.Telepathy.Channel.Interface.Group')
     inspected = conn.InspectHandles(1, group_iface.GetMembers())
@@ -31,7 +31,7 @@ def _expect_group_channel(q, bus, conn, name, contacts):
     assert handle_type == HT_GROUP, handle_type
     inspected = conn.InspectHandles(handle_type, [handle])[0]
     assert inspected == name, (inspected, name)
-    chan = bus.get_object(conn._named_service, path)
+    chan = bus.get_object(conn.bus_name, path)
     group_iface = dbus.Interface(chan,
         u'org.freedesktop.Telepathy.Channel.Interface.Group')
     inspected = conn.InspectHandles(1, group_iface.GetMembers())
diff --git a/tests/twisted/roster/test-google-roster.py b/tests/twisted/roster/test-google-roster.py
index ab91bd7..f31f59b 100644
--- a/tests/twisted/roster/test-google-roster.py
+++ b/tests/twisted/roster/test-google-roster.py
@@ -44,7 +44,7 @@ def expect_new_channel(event, data):
         return False
 
     # request subscription
-    chan = data['conn']._bus.get_object(data['conn']._named_service, path)
+    chan = data['conn']._bus.get_object(data['conn'].bus_name, path)
     group_iface = dbus.Interface(chan,
         u'org.freedesktop.Telepathy.Channel.Interface.Group')
     assert group_iface.GetMembers() == []
diff --git a/tests/twisted/roster/test-roster-subscribe.py b/tests/twisted/roster/test-roster-subscribe.py
index 033c408..b14af48 100644
--- a/tests/twisted/roster/test-roster-subscribe.py
+++ b/tests/twisted/roster/test-roster-subscribe.py
@@ -30,7 +30,7 @@ def expect_new_channel(event, data):
         return False
 
     # request subscription
-    chan = data['conn']._bus.get_object(data['conn']._named_service, path)
+    chan = data['conn']._bus.get_object(data['conn'].bus_name, path)
     group_iface = dbus.Interface(chan,
         u'org.freedesktop.Telepathy.Channel.Interface.Group')
     assert group_iface.GetMembers() == []
diff --git a/tests/twisted/roster/test-roster.py b/tests/twisted/roster/test-roster.py
index c52b76a..dca02c7 100644
--- a/tests/twisted/roster/test-roster.py
+++ b/tests/twisted/roster/test-roster.py
@@ -13,7 +13,7 @@ def _expect_contact_list_channel(q, bus, conn, name, contacts):
 
     assert type == u'org.freedesktop.Telepathy.Channel.Type.ContactList'
     assert conn.InspectHandles(handle_type, [handle])[0] == name
-    chan = bus.get_object(conn._named_service, path)
+    chan = bus.get_object(conn.bus_name, path)
     group_iface = dbus.Interface(chan,
         u'org.freedesktop.Telepathy.Channel.Interface.Group')
     members = group_iface.GetMembers()
diff --git a/tests/twisted/text/test-text.py b/tests/twisted/text/test-text.py
index 6a4ed49..599167a 100644
--- a/tests/twisted/text/test-text.py
+++ b/tests/twisted/text/test-text.py
@@ -21,7 +21,7 @@ def test(q, bus, conn, stream):
     stream.send(m)
 
     event = q.expect('dbus-signal', signal='NewChannel')
-    text_chan = bus.get_object(conn._named_service, event.args[0])
+    text_chan = bus.get_object(conn.bus_name, event.args[0])
     assert event.args[1] == u'org.freedesktop.Telepathy.Channel.Type.Text'
     # check that handle type == contact handle
     assert event.args[2] == 1
-- 
1.5.6.3




More information about the Telepathy-commits mailing list