[Telepathy-commits] [telepathy-gabble/master] Tests: use dbus.PROPERTIES_IFACE instead of hardcoded string

Alban Crequy alban.crequy at collabora.co.uk
Sat Jan 31 02:42:21 PST 2009


---
 tests/twisted/jingle/test-incoming-call-reject.py  |    2 +-
 tests/twisted/jingle/test-incoming-call.py         |    2 +-
 .../jingle/test-outgoing-call-deprecated.py        |    2 +-
 .../jingle/test-outgoing-call-deprecated2.py       |    2 +-
 .../jingle/test-outgoing-call-requestotron.py      |    4 +-
 tests/twisted/jingle/test-outgoing-call.py         |    4 +-
 tests/twisted/muc/roomlist.py                      |    8 +++---
 tests/twisted/muc/test-muc-invitation.py           |    2 +-
 tests/twisted/muc/test-muc-ownership.py            |    2 +-
 tests/twisted/muc/test-muc.py                      |    4 +-
 tests/twisted/olpc/gadget-publish.py               |    4 +-
 tests/twisted/olpc/olpc-activity-search.py         |   18 +++++++-------
 tests/twisted/olpc/olpc-buddy-search.py            |   16 ++++++------
 tests/twisted/olpc/view-presence.py                |    2 +-
 tests/twisted/roster/groups.py                     |    2 +-
 tests/twisted/roster/test-roster.py                |    4 +-
 tests/twisted/text/destroy.py                      |    2 +-
 tests/twisted/text/ensure.py                       |    6 ++--
 tests/twisted/text/initiate-requestotron.py        |    4 +-
 tests/twisted/text/initiate.py                     |    2 +-
 tests/twisted/text/respawn.py                      |    4 +-
 tests/twisted/text/test-text.py                    |    2 +-
 tests/twisted/tubes/accept-muc-stream-tube-ibb.py  |    2 +-
 tests/twisted/tubes/close-muc-with-closed-tube.py  |    2 +-
 tests/twisted/tubes/ensure-si-tube.py              |    2 +-
 ...offer-accept-private-dbus-stream-tube-socks5.py |   24 ++++++++++----------
 tests/twisted/tubes/offer-muc-dbus-tube.py         |    4 +-
 27 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/tests/twisted/jingle/test-incoming-call-reject.py b/tests/twisted/jingle/test-incoming-call-reject.py
index b58372a..78c2ff0 100644
--- a/tests/twisted/jingle/test-incoming-call-reject.py
+++ b/tests/twisted/jingle/test-incoming-call-reject.py
@@ -64,7 +64,7 @@ def test(q, bus, conn, stream):
     # Exercise channel properties
     channel_props = media_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetHandle'] == remote_handle
     assert channel_props['TargetHandleType'] == 1
     assert channel_props['TargetID'] == 'foo at bar.com'
diff --git a/tests/twisted/jingle/test-incoming-call.py b/tests/twisted/jingle/test-incoming-call.py
index 29ae126..2d28904 100644
--- a/tests/twisted/jingle/test-incoming-call.py
+++ b/tests/twisted/jingle/test-incoming-call.py
@@ -71,7 +71,7 @@ def test(q, bus, conn, stream):
     # Exercise channel properties
     channel_props = media_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetHandle'] == remote_handle
     assert channel_props['TargetHandleType'] == 1
     assert channel_props['TargetID'] == 'foo at bar.com'
diff --git a/tests/twisted/jingle/test-outgoing-call-deprecated.py b/tests/twisted/jingle/test-outgoing-call-deprecated.py
index cadeb47..5fca32b 100644
--- a/tests/twisted/jingle/test-outgoing-call-deprecated.py
+++ b/tests/twisted/jingle/test-outgoing-call-deprecated.py
@@ -51,7 +51,7 @@ def test(q, bus, conn, stream):
 
     channel_props = group_iface.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetHandleType'] == 1, channel_props
     assert channel_props['TargetHandle'] == handle, channel_props
     assert channel_props['TargetID'] == 'foo at bar.com', channel_props
diff --git a/tests/twisted/jingle/test-outgoing-call-deprecated2.py b/tests/twisted/jingle/test-outgoing-call-deprecated2.py
index 4107ca1..7ba04b5 100644
--- a/tests/twisted/jingle/test-outgoing-call-deprecated2.py
+++ b/tests/twisted/jingle/test-outgoing-call-deprecated2.py
@@ -51,7 +51,7 @@ def test(q, bus, conn, stream):
 
     channel_props = group_iface.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetID'] == '', channel_props
     assert channel_props['Requested'] == True
     assert channel_props['InitiatorID'] == 'test at localhost'
diff --git a/tests/twisted/jingle/test-outgoing-call-requestotron.py b/tests/twisted/jingle/test-outgoing-call-requestotron.py
index d25ccd4..22e65ed 100644
--- a/tests/twisted/jingle/test-outgoing-call-requestotron.py
+++ b/tests/twisted/jingle/test-outgoing-call-requestotron.py
@@ -100,7 +100,7 @@ def test(q, bus, conn, stream):
     # Exercise basic Channel Properties from spec 0.17.7
     channel_props = group_iface.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == handle, \
             channel_props.get('TargetHandle')
     assert channel_props.get('TargetHandleType') == 1,\
@@ -128,7 +128,7 @@ def test(q, bus, conn, stream):
     # Exercise Group Properties from spec 0.17.6 (in a basic way)
     group_props = group_iface.GetAll(
             'org.freedesktop.Telepathy.Channel.Interface.Group',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert 'HandleOwners' in group_props, group_props
     assert 'Members' in group_props, group_props
     assert 'LocalPendingMembers' in group_props, group_props
diff --git a/tests/twisted/jingle/test-outgoing-call.py b/tests/twisted/jingle/test-outgoing-call.py
index 4aff289..64f0824 100644
--- a/tests/twisted/jingle/test-outgoing-call.py
+++ b/tests/twisted/jingle/test-outgoing-call.py
@@ -90,7 +90,7 @@ def test(q, bus, conn, stream):
     # Exercise basic Channel Properties from spec 0.17.7
     channel_props = group_iface.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == 0, \
             channel_props.get('TargetHandle')
     assert channel_props.get('TargetHandleType') == 0,\
@@ -118,7 +118,7 @@ def test(q, bus, conn, stream):
     # Exercise Group Properties from spec 0.17.6 (in a basic way)
     group_props = group_iface.GetAll(
             'org.freedesktop.Telepathy.Channel.Interface.Group',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert 'HandleOwners' in group_props, group_props
     assert 'Members' in group_props, group_props
     assert 'LocalPendingMembers' in group_props, group_props
diff --git a/tests/twisted/muc/roomlist.py b/tests/twisted/muc/roomlist.py
index daefead..f5c343d 100644
--- a/tests/twisted/muc/roomlist.py
+++ b/tests/twisted/muc/roomlist.py
@@ -41,7 +41,7 @@ def test(q, bus, conn, stream):
 
     properties = conn.GetAll(
             tp_name_prefix + '.Connection.Interface.Requests',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert properties.get('Channels') == [], properties['Channels']
     assert ({tp_name_prefix + '.Channel.ChannelType':
                 tp_name_prefix + '.Channel.Type.RoomList',
@@ -89,7 +89,7 @@ def test(q, bus, conn, stream):
     # Exercise basic Channel Properties from spec 0.17.7
     channel_props = chan.GetAll(
             tp_name_prefix + '.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == 0,\
             channel_props.get('TargetHandle')
     assert channel_props['TargetID'] == '', channel_props
@@ -104,7 +104,7 @@ def test(q, bus, conn, stream):
 
     assert chan.Get(
             tp_name_prefix + '.Channel.Type.RoomList', 'Server',
-            dbus_interface='org.freedesktop.DBus.Properties') == \
+            dbus_interface=dbus.PROPERTIES_IFACE) == \
                     'conf.localhost'
 
     # FIXME: actually list the rooms!
@@ -152,7 +152,7 @@ def test(q, bus, conn, stream):
 
     assert chan.Get(
             tp_name_prefix + '.Channel.Type.RoomList', 'Server',
-            dbus_interface='org.freedesktop.DBus.Properties') == \
+            dbus_interface=dbus.PROPERTIES_IFACE) == \
                     'conference.example.net'
 
     # FIXME: actually list the rooms!
diff --git a/tests/twisted/muc/test-muc-invitation.py b/tests/twisted/muc/test-muc-invitation.py
index db53037..b521aa2 100644
--- a/tests/twisted/muc/test-muc-invitation.py
+++ b/tests/twisted/muc/test-muc-invitation.py
@@ -55,7 +55,7 @@ def test(q, bus, conn, stream):
 
     channel_props = text_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetID'] == 'chat at conf.localhost', channel_props
     assert channel_props['Requested'] == False
     assert channel_props['InitiatorID'] == 'bob at localhost'
diff --git a/tests/twisted/muc/test-muc-ownership.py b/tests/twisted/muc/test-muc-ownership.py
index 24430c6..4cc1a46 100644
--- a/tests/twisted/muc/test-muc-ownership.py
+++ b/tests/twisted/muc/test-muc-ownership.py
@@ -125,7 +125,7 @@ def test(q, bus, conn, stream):
     group = dbus.Interface(chan,
         'org.freedesktop.Telepathy.Channel.Interface.Group')
     props = dbus.Interface(chan,
-        'org.freedesktop.DBus.Properties')
+        dbus.PROPERTIES_IFACE)
 
     # Exercise GetHandleOwners
     assert group.GetHandleOwners([5, 7]) == [6, 8]
diff --git a/tests/twisted/muc/test-muc.py b/tests/twisted/muc/test-muc.py
index 986a233..19bbfdf 100644
--- a/tests/twisted/muc/test-muc.py
+++ b/tests/twisted/muc/test-muc.py
@@ -44,7 +44,7 @@ def test(q, bus, conn, stream):
     # Exercise basic Channel Properties from spec 0.17.7
     channel_props = text_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == room_handle,\
             (channel_props.get('TargetHandle'), room_handle)
     assert channel_props.get('TargetHandleType') == 2,\
@@ -72,7 +72,7 @@ def test(q, bus, conn, stream):
     # Exercise Group Properties from spec 0.17.6 (in a basic way)
     group_props = text_chan.GetAll(
             'org.freedesktop.Telepathy.Channel.Interface.Group',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert 'HandleOwners' in group_props, group_props
     assert 'Members' in group_props, group_props
     assert 'LocalPendingMembers' in group_props, group_props
diff --git a/tests/twisted/olpc/gadget-publish.py b/tests/twisted/olpc/gadget-publish.py
index 3ab4d92..a1349ee 100644
--- a/tests/twisted/olpc/gadget-publish.py
+++ b/tests/twisted/olpc/gadget-publish.py
@@ -27,7 +27,7 @@ def test(q, bus, conn, stream):
 
     props = conn.GetAll(
             'org.laptop.Telepathy.Gadget',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert props['GadgetAvailable'] == False
 
     announce_gadget(q, stream, disco_event.stanza)
@@ -36,7 +36,7 @@ def test(q, bus, conn, stream):
 
     props = conn.GetAll(
             'org.laptop.Telepathy.Gadget',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert props['GadgetAvailable'] == True
 
     gadget_iface = dbus.Interface(conn, 'org.laptop.Telepathy.Gadget')
diff --git a/tests/twisted/olpc/olpc-activity-search.py b/tests/twisted/olpc/olpc-activity-search.py
index 5bb1cbc..c3d8bc1 100644
--- a/tests/twisted/olpc/olpc-activity-search.py
+++ b/tests/twisted/olpc/olpc-activity-search.py
@@ -20,13 +20,13 @@ olpc_name_prefix = 'org.laptop.Telepathy'
 def check_view(view, conn, activities, buddies):
     act = view.Get(olpc_name_prefix + '.Channel.Interface.View',
         'Activities',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert sorted(act) == sorted(activities)
 
     handles = view.Get(olpc_name_prefix + '.Channel.Interface.View',
         'Buddies',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
     assert sorted(conn.InspectHandles(1, handles)) == sorted(buddies)
 
 def test(q, bus, conn, stream):
@@ -62,7 +62,7 @@ def test(q, bus, conn, stream):
     # check if we can request Activity views
     properties = conn.GetAll(
         'org.freedesktop.Telepathy.Connection.Interface.Requests',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert ({tp_name_prefix + '.Channel.ChannelType':
             olpc_name_prefix + '.Channel.Type.ActivityView'},
@@ -85,7 +85,7 @@ def test(q, bus, conn, stream):
     # check org.freedesktop.Telepathy.Channel D-Bus properties
     props = view1.GetAll(
         'org.freedesktop.Telepathy.Channel',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert props['ChannelType'] == 'org.laptop.Telepathy.Channel.Type.ActivityView'
     assert 'org.laptop.Telepathy.Channel.Interface.View' in props['Interfaces']
@@ -96,14 +96,14 @@ def test(q, bus, conn, stream):
     # check org.laptop.Telepathy.Channel.Interface.View D-Bus properties
     props = view1.GetAll(
         'org.laptop.Telepathy.Channel.Interface.View',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert props['MaxSize'] == 3
 
     # check org.laptop.Telepathy.Channel.Type.ActivityView D-Bus properties
     props = view1.GetAll(
         'org.laptop.Telepathy.Channel.Type.ActivityView',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert props['Properties'] == {}
     assert props['Participants'] == []
@@ -215,12 +215,12 @@ def test(q, bus, conn, stream):
 
     act = view2.Get(olpc_name_prefix + '.Channel.Interface.View',
         'Activities',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
     assert sorted(act) == [('activity2', handles['room2'])]
 
     buddies = view2.Get(olpc_name_prefix + '.Channel.Interface.View',
         'Buddies',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
     assert buddies == []
 
     # activity search by participants (view 3)
@@ -270,7 +270,7 @@ def test(q, bus, conn, stream):
 
     act = view3.Get(olpc_name_prefix + '.Channel.Interface.View',
         'Activities',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
     assert sorted(act) == [('activity3', handles['room3'])]
 
     # add activity 4 to view 1
diff --git a/tests/twisted/olpc/olpc-buddy-search.py b/tests/twisted/olpc/olpc-buddy-search.py
index 297fc96..571f93a 100644
--- a/tests/twisted/olpc/olpc-buddy-search.py
+++ b/tests/twisted/olpc/olpc-buddy-search.py
@@ -89,7 +89,7 @@ def test(q, bus, conn, stream):
     # check if we can request Buddy views
     properties = conn.GetAll(
         'org.freedesktop.Telepathy.Connection.Interface.Requests',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert ({tp_name_prefix + '.Channel.ChannelType':
             olpc_name_prefix + '.Channel.Type.BuddyView'},
@@ -156,7 +156,7 @@ def test(q, bus, conn, stream):
     # check org.freedesktop.Telepathy.Channel D-Bus properties
     props = view1.GetAll(
         'org.freedesktop.Telepathy.Channel',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert props['ChannelType'] == 'org.laptop.Telepathy.Channel.Type.BuddyView'
     assert 'org.laptop.Telepathy.Channel.Interface.View' in props['Interfaces']
@@ -167,14 +167,14 @@ def test(q, bus, conn, stream):
     # check org.laptop.Telepathy.Channel.Interface.View D-Bus properties
     props = view1.GetAll(
         'org.laptop.Telepathy.Channel.Interface.View',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert props['MaxSize'] == 3
 
     # check org.laptop.Telepathy.Channel.Type.BuddyView D-Bus properties
     props = view1.GetAll(
         'org.laptop.Telepathy.Channel.Type.BuddyView',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert props['Properties'] == {}
     assert props['Alias'] == ''
@@ -261,7 +261,7 @@ def test(q, bus, conn, stream):
     # check org.laptop.Telepathy.Channel.Type.BuddyView D-Bus properties
     props = view2.GetAll(
         'org.laptop.Telepathy.Channel.Type.BuddyView',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert props['Properties'] == {'color': '#AABBCC,#001122'}
     assert props['Alias'] == ''
@@ -300,7 +300,7 @@ def test(q, bus, conn, stream):
 
     members = view1.Get(olpc_name_prefix + '.Channel.Interface.View',
         'Buddies',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     members = sorted(conn.InspectHandles(1, members))
     assert sorted(members) == ['bob at localhost', 'charles at localhost',
@@ -325,7 +325,7 @@ def test(q, bus, conn, stream):
 
     members = view1.Get(olpc_name_prefix + '.Channel.Interface.View',
         'Buddies',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
     members = sorted(conn.InspectHandles(1, members))
     assert sorted(members) == ['charles at localhost', 'oscar at localhost']
 
@@ -372,7 +372,7 @@ def test(q, bus, conn, stream):
     # check org.laptop.Telepathy.Channel.Type.BuddyView D-Bus properties
     props = view3.GetAll(
         'org.laptop.Telepathy.Channel.Type.BuddyView',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert props['Properties'] == {}
     assert props['Alias'] == 'tom'
diff --git a/tests/twisted/olpc/view-presence.py b/tests/twisted/olpc/view-presence.py
index d75557e..0e257d0 100644
--- a/tests/twisted/olpc/view-presence.py
+++ b/tests/twisted/olpc/view-presence.py
@@ -201,7 +201,7 @@ def test(q, bus, conn, stream):
 
     # Fred is the only buddy in this view
     buddies = view2.Get('org.laptop.Telepathy.Channel.Interface.View', 'Buddies',
-        dbus_interface='org.freedesktop.DBus.Properties')
+        dbus_interface=dbus.PROPERTIES_IFACE)
     assert buddies == [handles['fred']]
 
     # ... and his presence didn't change
diff --git a/tests/twisted/roster/groups.py b/tests/twisted/roster/groups.py
index 0a25bf5..d8f3cac 100644
--- a/tests/twisted/roster/groups.py
+++ b/tests/twisted/roster/groups.py
@@ -39,7 +39,7 @@ def _expect_group_channel(q, bus, conn, name, contacts):
 
     channel_props = chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetID'] == name, channel_props
     assert channel_props['Requested'] == False
     assert channel_props['InitiatorID'] == ''
diff --git a/tests/twisted/roster/test-roster.py b/tests/twisted/roster/test-roster.py
index 4a8d814..4329588 100644
--- a/tests/twisted/roster/test-roster.py
+++ b/tests/twisted/roster/test-roster.py
@@ -37,7 +37,7 @@ def _expect_contact_list_channel(q, bus, conn, name, contacts):
     # Exercise basic Channel Properties from spec 0.17.7
     channel_props = chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == handle,\
             (channel_props.get('TargetHandle'), handle)
     assert channel_props.get('TargetHandleType') == 3,\
@@ -56,7 +56,7 @@ def _expect_contact_list_channel(q, bus, conn, name, contacts):
     # Exercise Group Properties from spec 0.17.6 (in a basic way)
     group_props = chan.GetAll(
             'org.freedesktop.Telepathy.Channel.Interface.Group',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert 'HandleOwners' in group_props, group_props
     assert 'Members' in group_props, group_props
     assert group_props['Members'] == members, group_props['Members']
diff --git a/tests/twisted/text/destroy.py b/tests/twisted/text/destroy.py
index 28638e8..20abc35 100644
--- a/tests/twisted/text/destroy.py
+++ b/tests/twisted/text/destroy.py
@@ -67,7 +67,7 @@ def test(q, bus, conn, stream):
 
     channel_props = text_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetID'] == jid,\
             (channel_props['TargetID'], jid)
     assert channel_props['Requested'] == True
diff --git a/tests/twisted/text/ensure.py b/tests/twisted/text/ensure.py
index 6191e1f..6edd6bc 100644
--- a/tests/twisted/text/ensure.py
+++ b/tests/twisted/text/ensure.py
@@ -23,7 +23,7 @@ def test(q, bus, conn, stream):
 
     properties = conn.GetAll(
             'org.freedesktop.Telepathy.Connection.Interface.Requests',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert properties.get('Channels') == [], properties['Channels']
     assert ({'org.freedesktop.Telepathy.Channel.ChannelType':
                 'org.freedesktop.Telepathy.Channel.Type.Text',
@@ -87,7 +87,7 @@ def test_ensure_ensure(q, requestotron, conn, self_handle, jid, handle):
 
     properties = conn.GetAll(
             'org.freedesktop.Telepathy.Connection.Interface.Requests',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert new_sig.args[0][0] in properties['Channels'], \
             (new_sig.args[0][0], properties['Channels'])
@@ -144,7 +144,7 @@ def test_request_ensure(q, requestotron, conn, self_handle, jid, handle):
 
     properties = conn.GetAll(
             'org.freedesktop.Telepathy.Connection.Interface.Requests',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert new_sig.args[0][0] in properties['Channels'], \
             (new_sig.args[0][0], properties['Channels'])
diff --git a/tests/twisted/text/initiate-requestotron.py b/tests/twisted/text/initiate-requestotron.py
index 50e6989..b1568f2 100644
--- a/tests/twisted/text/initiate-requestotron.py
+++ b/tests/twisted/text/initiate-requestotron.py
@@ -23,7 +23,7 @@ def test(q, bus, conn, stream):
 
     properties = conn.GetAll(
             'org.freedesktop.Telepathy.Connection.Interface.Requests',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert properties.get('Channels') == [], properties['Channels']
     assert ({'org.freedesktop.Telepathy.Channel.ChannelType':
                 'org.freedesktop.Telepathy.Channel.Type.Text',
@@ -81,7 +81,7 @@ def test(q, bus, conn, stream):
 
     properties = conn.GetAll(
             'org.freedesktop.Telepathy.Connection.Interface.Requests',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
 
     assert new_sig.args[0][0] in properties['Channels'], \
             (new_sig.args[0][0], properties['Channels'])
diff --git a/tests/twisted/text/initiate.py b/tests/twisted/text/initiate.py
index a1e11a7..a2ac19a 100644
--- a/tests/twisted/text/initiate.py
+++ b/tests/twisted/text/initiate.py
@@ -43,7 +43,7 @@ def test(q, bus, conn, stream):
     # Exercise basic Channel Properties from spec 0.17.7
     channel_props = text_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == foo_handle,\
             (channel_props.get('TargetHandle'), foo_handle)
     assert channel_props.get('TargetHandleType') == 1,\
diff --git a/tests/twisted/text/respawn.py b/tests/twisted/text/respawn.py
index fce1ed8..0f48284 100644
--- a/tests/twisted/text/respawn.py
+++ b/tests/twisted/text/respawn.py
@@ -64,7 +64,7 @@ def test(q, bus, conn, stream):
 
     channel_props = text_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetID'] == jid,\
             (channel_props['TargetID'], jid)
     assert channel_props['Requested'] == True
@@ -135,7 +135,7 @@ def test(q, bus, conn, stream):
 
     channel_props = text_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetID'] == jid,\
             (channel_props['TargetID'], jid)
     assert channel_props['Requested'] == False
diff --git a/tests/twisted/text/test-text.py b/tests/twisted/text/test-text.py
index 21109fe..1034250 100644
--- a/tests/twisted/text/test-text.py
+++ b/tests/twisted/text/test-text.py
@@ -32,7 +32,7 @@ def test(q, bus, conn, stream):
     # Exercise basic Channel Properties from spec 0.17.7
     channel_props = text_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == event.args[3],\
             (channel_props.get('TargetHandle'), event.args[3])
     assert channel_props.get('TargetHandleType') == 1,\
diff --git a/tests/twisted/tubes/accept-muc-stream-tube-ibb.py b/tests/twisted/tubes/accept-muc-stream-tube-ibb.py
index 7953001..1b8c696 100644
--- a/tests/twisted/tubes/accept-muc-stream-tube-ibb.py
+++ b/tests/twisted/tubes/accept-muc-stream-tube-ibb.py
@@ -134,7 +134,7 @@ def test(q, bus, conn, stream):
 
     channel_props = tubes_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetID'] == 'chat at conf.localhost', channel_props
     assert channel_props['Requested'] == False
     assert channel_props['InitiatorID'] == ''
diff --git a/tests/twisted/tubes/close-muc-with-closed-tube.py b/tests/twisted/tubes/close-muc-with-closed-tube.py
index 3748315..128a9c5 100644
--- a/tests/twisted/tubes/close-muc-with-closed-tube.py
+++ b/tests/twisted/tubes/close-muc-with-closed-tube.py
@@ -139,7 +139,7 @@ def test(q, bus, conn, stream):
 
     channel_props = tubes_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props['TargetID'] == 'chat at conf.localhost', channel_props
     assert channel_props['Requested'] == False
     assert channel_props['InitiatorID'] == ''
diff --git a/tests/twisted/tubes/ensure-si-tube.py b/tests/twisted/tubes/ensure-si-tube.py
index 610942f..e84a0fb 100644
--- a/tests/twisted/tubes/ensure-si-tube.py
+++ b/tests/twisted/tubes/ensure-si-tube.py
@@ -53,7 +53,7 @@ def test(q, bus, conn, stream):
 
     properties = conn.GetAll(
             'org.freedesktop.Telepathy.Connection.Interface.Requests',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert properties.get('Channels') == [], properties['Channels']
     assert ({'org.freedesktop.Telepathy.Channel.ChannelType':
                 'org.freedesktop.Telepathy.Channel.Type.Tubes',
diff --git a/tests/twisted/tubes/offer-accept-private-dbus-stream-tube-socks5.py b/tests/twisted/tubes/offer-accept-private-dbus-stream-tube-socks5.py
index 4045dbc..d2e8185 100644
--- a/tests/twisted/tubes/offer-accept-private-dbus-stream-tube-socks5.py
+++ b/tests/twisted/tubes/offer-accept-private-dbus-stream-tube-socks5.py
@@ -82,7 +82,7 @@ class S5BFactory(Factory):
 def check_conn_properties(q, bus, conn, stream, channel_list=None):
     properties = conn.GetAll(
             'org.freedesktop.Telepathy.Connection.Interface.Requests',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
 
     if channel_list == None:
         assert properties.get('Channels') == [], properties['Channels']
@@ -118,7 +118,7 @@ def check_channel_properties(q, bus, conn, stream, channel, channel_type,
     # on the channel of type channel_type
     channel_props = channel.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == contact_handle,\
             (channel_props.get('TargetHandle'), contact_handle)
     assert channel_props.get('TargetHandleType') == 1,\
@@ -144,7 +144,7 @@ def check_channel_properties(q, bus, conn, stream, channel, channel_type,
         assert state is not None
         tube_props = channel.GetAll(
                 'org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT',
-                dbus_interface='org.freedesktop.DBus.Properties')
+                dbus_interface=dbus.PROPERTIES_IFACE)
         assert tube_props['State'] == state
         # no strict check but at least check the properties exist
         assert tube_props['Parameters'] is not None
@@ -155,7 +155,7 @@ def check_channel_properties(q, bus, conn, stream, channel, channel_type,
 
         stream_tube_props = channel.GetAll(
                 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
-                dbus_interface='org.freedesktop.DBus.Properties')
+                dbus_interface=dbus.PROPERTIES_IFACE)
         supported_socket_types = stream_tube_props['SupportedSocketTypes']
 
     # Support for different socket types. no strict check but at least check
@@ -452,28 +452,28 @@ def test(q, bus, conn, stream):
     self_handle = conn.GetSelfHandle()
     tube_basic_props = tube_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert tube_basic_props.get("InitiatorHandle") == self_handle
 
     stream_tube_props = tube_chan.GetAll(
             'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert stream_tube_props.get("Service") == "newecho", stream_tube_props
 
     tube_props = tube_chan.GetAll(
             'org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert tube_props.get("Parameters") == dbus.Dictionary(
             {dbus.String(u'foo'): dbus.String(u'bar')},
             signature=dbus.Signature('sv'))
     # change the parameters
     tube_chan.Set('org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT',
             'Parameters', new_sample_parameters,
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     # check it is correctly changed
     tube_props = tube_chan.GetAll(
             'org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT',
-            dbus_interface='org.freedesktop.DBus.Properties', byte_arrays=True)
+            dbus_interface=dbus.PROPERTIES_IFACE, byte_arrays=True)
     assert tube_props.get("Parameters") == new_sample_parameters, \
             tube_props.get("Parameters")
 
@@ -517,18 +517,18 @@ def test(q, bus, conn, stream):
     # The new tube has been offered, the parameters cannot be changed anymore
     # We need to use call_async to check the error
     tube_prop_iface = dbus.Interface(tube_chan,
-        'org.freedesktop.DBus.Properties')
+        dbus.PROPERTIES_IFACE)
     call_async(q, tube_prop_iface, 'Set',
         'org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT',
             'Parameters', dbus.Dictionary(
             {dbus.String(u'foo2'): dbus.String(u'bar2')},
             signature=dbus.Signature('sv')),
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     set_error = q.expect('dbus-error')
     # check it is *not* correctly changed
     tube_props = tube_chan.GetAll(
             'org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT',
-            dbus_interface='org.freedesktop.DBus.Properties', byte_arrays=True)
+            dbus_interface=dbus.PROPERTIES_IFACE, byte_arrays=True)
     assert tube_props.get("Parameters") == new_sample_parameters, \
             tube_props.get("Parameters")
 
diff --git a/tests/twisted/tubes/offer-muc-dbus-tube.py b/tests/twisted/tubes/offer-muc-dbus-tube.py
index b4b0fb1..9ffa237 100644
--- a/tests/twisted/tubes/offer-muc-dbus-tube.py
+++ b/tests/twisted/tubes/offer-muc-dbus-tube.py
@@ -43,7 +43,7 @@ def test(q, bus, conn, stream):
     # Exercise basic Channel Properties from spec 0.17.7
     channel_props = tubes_chan.GetAll(
             'org.freedesktop.Telepathy.Channel',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert channel_props.get('TargetHandle') == handles[0],\
             (channel_props.get('TargetHandle'), handles[0])
     assert channel_props.get('TargetHandleType') == 2,\
@@ -63,7 +63,7 @@ def test(q, bus, conn, stream):
     # Exercise Group Properties from spec 0.17.6 (in a basic way)
     group_props = tubes_chan.GetAll(
             'org.freedesktop.Telepathy.Channel.Interface.Group',
-            dbus_interface='org.freedesktop.DBus.Properties')
+            dbus_interface=dbus.PROPERTIES_IFACE)
     assert 'SelfHandle' in group_props, group_props
     assert 'HandleOwners' in group_props, group_props
     assert 'Members' in group_props, group_props
-- 
1.5.6.5



More information about the telepathy-commits mailing list