telepathy-haze: Tests: replace GetSelfHandle calls with property-getting
Simon McVittie
smcv at kemper.freedesktop.org
Mon Sep 23 08:12:12 PDT 2013
Module: telepathy-haze
Branch: master
Commit: 6edf26eca064f10f790bfa925131a100c60f68e5
URL: http://cgit.freedesktop.org/telepathy/telepathy-haze/commit/?id=6edf26eca064f10f790bfa925131a100c60f68e5
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Fri Sep 20 14:43:37 2013 +0100
Tests: replace GetSelfHandle calls with property-getting
sed expression:
s/\.GetSelfHandle()/.Properties.Get(cs.CONN, "SelfHandle")/g
adjusted by hand to add "import constants as cs" where needed.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69619
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
tests/twisted/roster/groups.py | 2 +-
tests/twisted/roster/publish.py | 2 +-
tests/twisted/roster/subscribe.py | 2 +-
tests/twisted/text/destroy.py | 3 ++-
tests/twisted/text/ensure.py | 2 +-
tests/twisted/text/initiate-requestotron.py | 2 +-
tests/twisted/text/initiate.py | 3 ++-
tests/twisted/text/respawn.py | 3 ++-
8 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/tests/twisted/roster/groups.py b/tests/twisted/roster/groups.py
index 8f8f2c9..0420e19 100644
--- a/tests/twisted/roster/groups.py
+++ b/tests/twisted/roster/groups.py
@@ -14,7 +14,7 @@ import constants as cs
import ns
def test(q, bus, conn, stream):
- self_handle = conn.GetSelfHandle()
+ self_handle = conn.Properties.Get(cs.CONN, "SelfHandle")
# Close all Group channels to get a clean slate, so we can rely on
# the NewChannels signal for the default group later
diff --git a/tests/twisted/roster/publish.py b/tests/twisted/roster/publish.py
index f04abca..e8f5b2d 100644
--- a/tests/twisted/roster/publish.py
+++ b/tests/twisted/roster/publish.py
@@ -74,7 +74,7 @@ def test(q, bus, conn, stream):
args=['', [alice], [], [], [], 0, cs.GC_REASON_NONE]),
)
- self_handle = conn.GetSelfHandle()
+ self_handle = conn.Properties.Get(cs.CONN, "SelfHandle")
# accept
call_async(q, publish.Group, 'AddMembers', [alice], '')
diff --git a/tests/twisted/roster/subscribe.py b/tests/twisted/roster/subscribe.py
index f6225de..102ab71 100644
--- a/tests/twisted/roster/subscribe.py
+++ b/tests/twisted/roster/subscribe.py
@@ -13,7 +13,7 @@ import constants as cs
import ns
def test(q, bus, conn, stream):
- self_handle = conn.GetSelfHandle()
+ self_handle = conn.Properties.Get(cs.CONN, "SelfHandle")
# Close all Group channels to get a clean slate, so we can rely on
# the NewChannels signal for the default group later
diff --git a/tests/twisted/text/destroy.py b/tests/twisted/text/destroy.py
index 1b5e8fb..5860219 100644
--- a/tests/twisted/text/destroy.py
+++ b/tests/twisted/text/destroy.py
@@ -9,9 +9,10 @@ from twisted.words.xish import domish
from hazetest import exec_test
from servicetest import call_async, EventPattern, assertEquals
+import constants as cs
def test(q, bus, conn, stream):
- self_handle = conn.GetSelfHandle()
+ self_handle = conn.Properties.Get(cs.CONN, "SelfHandle")
jid = 'foo at bar.com'
call_async(q, conn, 'RequestHandles', 1, [jid])
diff --git a/tests/twisted/text/ensure.py b/tests/twisted/text/ensure.py
index 21876c3..2aebf8c 100644
--- a/tests/twisted/text/ensure.py
+++ b/tests/twisted/text/ensure.py
@@ -14,7 +14,7 @@ import pprint
import constants as cs
def test(q, bus, conn, stream):
- self_handle = conn.GetSelfHandle()
+ self_handle = conn.Properties.Get(cs.CONN, "SelfHandle")
jids = ['foo at bar.com', 'truc at cafe.fr']
call_async(q, conn, 'RequestHandles', 1, jids)
diff --git a/tests/twisted/text/initiate-requestotron.py b/tests/twisted/text/initiate-requestotron.py
index a116d2c..9e52c34 100644
--- a/tests/twisted/text/initiate-requestotron.py
+++ b/tests/twisted/text/initiate-requestotron.py
@@ -12,7 +12,7 @@ from servicetest import call_async, EventPattern
import constants as cs
def test(q, bus, conn, stream):
- self_handle = conn.GetSelfHandle()
+ self_handle = conn.Properties.Get(cs.CONN, "SelfHandle")
jid = 'foo at bar.com'
call_async(q, conn, 'RequestHandles', 1, [jid])
diff --git a/tests/twisted/text/initiate.py b/tests/twisted/text/initiate.py
index 88d8117..e93d318 100644
--- a/tests/twisted/text/initiate.py
+++ b/tests/twisted/text/initiate.py
@@ -8,9 +8,10 @@ from twisted.words.xish import domish
from hazetest import exec_test
from servicetest import call_async, EventPattern
+import constants as cs
def test(q, bus, conn, stream):
- self_handle = conn.GetSelfHandle()
+ self_handle = conn.Properties.Get(cs.CONN, "SelfHandle")
jid = 'foo at bar.com'
call_async(q, conn, 'RequestHandles', 1, [jid])
diff --git a/tests/twisted/text/respawn.py b/tests/twisted/text/respawn.py
index baf5a3d..52b5e88 100644
--- a/tests/twisted/text/respawn.py
+++ b/tests/twisted/text/respawn.py
@@ -8,9 +8,10 @@ from twisted.words.xish import domish
from hazetest import exec_test
from servicetest import call_async, EventPattern, assertEquals
+import constants as cs
def test(q, bus, conn, stream):
- self_handle = conn.GetSelfHandle()
+ self_handle = conn.Properties.Get(cs.CONN, "SelfHandle")
jid = 'foo at bar.com'
call_async(q, conn, 'RequestHandles', 1, [jid])
More information about the telepathy-commits
mailing list