summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-09-20 14:43:37 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-09-23 16:11:47 +0100
commit6edf26eca064f10f790bfa925131a100c60f68e5 (patch)
treef09d4ac1f2781896c69da3dbeb92f83b3ff9bb88
parent65d38a3105b091cc32aa6227e90a68026b138bb4 (diff)
downloadtelepathy-haze-6edf26eca064f10f790bfa925131a100c60f68e5.tar.gz
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@collabora.co.uk>
-rw-r--r--tests/twisted/roster/groups.py2
-rw-r--r--tests/twisted/roster/publish.py2
-rw-r--r--tests/twisted/roster/subscribe.py2
-rw-r--r--tests/twisted/text/destroy.py3
-rw-r--r--tests/twisted/text/ensure.py2
-rw-r--r--tests/twisted/text/initiate-requestotron.py2
-rw-r--r--tests/twisted/text/initiate.py3
-rw-r--r--tests/twisted/text/respawn.py3
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@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@bar.com', 'truc@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@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@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@bar.com'
call_async(q, conn, 'RequestHandles', 1, [jid])