[telepathy-gabble/master] don't strip common prefix from object paths

Dafydd Harries dafydd.harries at collabora.co.uk
Tue Sep 22 05:49:01 PDT 2009


It was supposed to make test logs easier to read but ends up making test code
more complicated.
---
 tests/twisted/jingle/call-state.py                 |   20 +++++++++-----------
 tests/twisted/jingle/google-relay.py               |    6 +++---
 tests/twisted/jingle/hold-av.py                    |   15 +++++----------
 tests/twisted/jingle/incoming-basics.py            |    6 ++----
 tests/twisted/jingle/initial-audio-video.py        |   10 +++-------
 tests/twisted/jingle/outgoing-many-streams.py      |    6 +++---
 tests/twisted/jingle/preload-caps-crash.py         |    4 +---
 tests/twisted/jingle/stun-server.py                |    4 ++--
 .../twisted/jingle/test-content-adding-removal.py  |    8 ++------
 tests/twisted/jingle/test-content-complex.py       |    9 ++++-----
 tests/twisted/jingle/test-description-info.py      |    6 +++---
 tests/twisted/jingle/test-incoming-call-reject.py  |    5 ++---
 tests/twisted/muc/roomlist.py                      |    9 +++------
 tests/twisted/roster/removed-from-rp-subscribe.py  |   13 ++++++-------
 tests/twisted/servicetest.py                       |    2 +-
 tests/twisted/text/destroy.py                      |    6 +++---
 tests/twisted/text/respawn.py                      |   10 +++++-----
 17 files changed, 57 insertions(+), 82 deletions(-)

diff --git a/tests/twisted/jingle/call-state.py b/tests/twisted/jingle/call-state.py
index d2c288a..b75fd02 100644
--- a/tests/twisted/jingle/call-state.py
+++ b/tests/twisted/jingle/call-state.py
@@ -7,7 +7,7 @@ from twisted.words.xish import xpath
 
 from gabbletest import make_result_iq
 from servicetest import (
-    wrap_channel, make_channel_proxy, EventPattern, tp_path_prefix, sync_dbus)
+    wrap_channel, make_channel_proxy, EventPattern, sync_dbus)
 import ns
 import constants as cs
 
@@ -46,7 +46,6 @@ def test(jp, q, bus, conn, stream):
 
     e = q.expect('dbus-signal', signal='NewStreamHandler')
     audio_path = e.args[0]
-    audio_path_suffix = audio_path[len(tp_path_prefix):]
     stream_handler = make_channel_proxy(conn, audio_path, 'Media.StreamHandler')
 
     stream_handler.NewNativeCandidate("fake", jt.get_remote_transports_dbus())
@@ -86,7 +85,7 @@ def test(jp, q, bus, conn, stream):
 
         forbidden = [
             EventPattern('dbus-signal', signal='SetStreamSending', args=[True],
-                path=audio_path_suffix),
+                path=audio_path),
                 ]
         q.forbid_events(forbidden)
 
@@ -133,7 +132,7 @@ def test(jp, q, bus, conn, stream):
     # Jingle.
     q.expect_many(
         EventPattern('dbus-signal', signal='SetStreamSending', args=[True],
-            path=audio_path_suffix),
+            path=audio_path),
         EventPattern('dbus-signal', signal='CallStateChanged',
             args=[ handle, 0 ]),
         )
@@ -156,7 +155,7 @@ def test(jp, q, bus, conn, stream):
     q.expect_many(
         EventPattern('stream-iq', iq_type='result', iq_id=node[2]['id']),
         EventPattern('dbus-signal', signal='SetStreamSending', args=[False],
-            path=audio_path_suffix),
+            path=audio_path),
         EventPattern('dbus-signal', signal='CallStateChanged',
             args=[handle, cs.CALL_STATE_HELD]),
         )
@@ -197,7 +196,7 @@ def test(jp, q, bus, conn, stream):
     q.expect_many(
         EventPattern('stream-iq', iq_type='result', iq_id=node[2]['id']),
         EventPattern('dbus-signal', signal='SetStreamSending', args=[True],
-            path=audio_path_suffix),
+            path=audio_path),
         EventPattern('dbus-signal', signal='CallStateChanged',
             args=[handle, 0]),
         )
@@ -211,7 +210,6 @@ def test(jp, q, bus, conn, stream):
 
     e = q.expect('dbus-signal', signal='NewStreamHandler')
     video_path = e.args[0]
-    video_path_suffix = video_path[len(tp_path_prefix):]
     stream_handler2 = make_channel_proxy(conn, video_path, 'Media.StreamHandler')
 
     stream_handler2.NewNativeCandidate("fake", jt.get_remote_transports_dbus())
@@ -224,7 +222,7 @@ def test(jp, q, bus, conn, stream):
     jt.content_accept(e.query, 'video')
 
     q.expect('dbus-signal', signal='SetStreamSending', args=[True],
-        path=video_path_suffix)
+        path=video_path)
 
     call_states = chan.CallState.GetCallStates()
     assert call_states == { handle: 0 } or call_states == {}, call_states
@@ -239,9 +237,9 @@ def test(jp, q, bus, conn, stream):
     q.expect_many(
         EventPattern('stream-iq', iq_type='result', iq_id=node[2]['id']),
         EventPattern('dbus-signal', signal='SetStreamSending', args=[False],
-            path=audio_path_suffix),
+            path=audio_path),
         EventPattern('dbus-signal', signal='SetStreamSending', args=[False],
-            path=video_path_suffix),
+            path=video_path),
         EventPattern('dbus-signal', signal='CallStateChanged',
             args=[handle, cs.CALL_STATE_HELD]),
         )
@@ -261,7 +259,7 @@ def test(jp, q, bus, conn, stream):
 
     forbidden = [
         EventPattern('dbus-signal', signal='SetStreamSending', args=[True],
-            path=audio_path_suffix),
+            path=audio_path),
         EventPattern('dbus-signal', signal='CallStateChanged',
             args=[ handle, 0 ]),
             ]
diff --git a/tests/twisted/jingle/google-relay.py b/tests/twisted/jingle/google-relay.py
index d922e8c..32ea5c7 100644
--- a/tests/twisted/jingle/google-relay.py
+++ b/tests/twisted/jingle/google-relay.py
@@ -4,7 +4,7 @@ Test getting relay from Google jingleinfo
 
 from gabbletest import exec_test, make_result_iq, sync_stream, \
         GoogleXmlStream, disconnect_conn
-from servicetest import make_channel_proxy, tp_path_prefix, \
+from servicetest import make_channel_proxy, \
         EventPattern, call_async, sync_dbus, assertEquals
 import jingletest
 import gabbletest
@@ -164,7 +164,7 @@ def test(q, bus, conn, stream, incoming=True, too_slow=None):
             req_pattern,
             req_pattern)
 
-        media_chan = make_channel_proxy(conn, tp_path_prefix + mc.path,
+        media_chan = make_channel_proxy(conn, mc.path,
             'Channel.Interface.Group')
     else:
         call_async(q, conn.Requests, 'CreateChannel',
@@ -296,7 +296,7 @@ def test_too_slow(q, bus, conn, stream, req1, req2, media_chan, too_slow):
 
     # User gets bored, and ends the call.
     e = EventPattern('dbus-signal', signal='Closed',
-        path=media_chan.object_path[len(tp_path_prefix):])
+        path=media_chan.object_path)
 
     if too_slow == TOO_SLOW_CLOSE:
         call_async(q, media_chan, 'Close', dbus_interface=cs.CHANNEL)
diff --git a/tests/twisted/jingle/hold-av.py b/tests/twisted/jingle/hold-av.py
index f59cd4e..6e09901 100644
--- a/tests/twisted/jingle/hold-av.py
+++ b/tests/twisted/jingle/hold-av.py
@@ -5,8 +5,7 @@ Test the Hold API.
 from gabbletest import make_result_iq, sync_stream
 from servicetest import (
     assertEquals, wrap_channel,
-    make_channel_proxy, call_async, EventPattern, sync_dbus, tp_path_prefix,
-    )
+    make_channel_proxy, call_async, EventPattern, sync_dbus)
 
 import constants as cs
 
@@ -39,13 +38,11 @@ def mutable_stream_tests(jp, jt, q, bus, conn, stream, chan, handle):
             jt.get_remote_transports_dbus())
     audio_stream_handler.StreamState(cs.MEDIA_STREAM_STATE_CONNECTED)
 
-    path_suffix = audio_stream_path[len(tp_path_prefix):]
-
     q.expect_many(
         EventPattern('dbus-signal', signal='SetStreamHeld', args=[True],
-            path=path_suffix),
+            path=audio_stream_path),
         EventPattern('dbus-signal', signal='SetStreamSending', args=[False],
-            path=path_suffix),
+            path=audio_stream_path),
         )
 
     assertEquals(cs.HS_HELD, chan.Hold.GetHoldState()[0])
@@ -78,13 +75,11 @@ def mutable_stream_tests(jp, jt, q, bus, conn, stream, chan, handle):
             jt.get_remote_transports_dbus())
     video_stream_handler.StreamState(cs.MEDIA_STREAM_STATE_CONNECTED)
 
-    path_suffix = video_stream_path[len(tp_path_prefix):]
-
     q.expect_many(
         EventPattern('dbus-signal', signal='SetStreamHeld', args=[True],
-            path=path_suffix),
+            path=video_stream_path),
         EventPattern('dbus-signal', signal='SetStreamSending', args=[False],
-            path=path_suffix),
+            path=video_stream_path),
         )
 
     assertEquals(cs.HS_HELD, chan.Hold.GetHoldState()[0])
diff --git a/tests/twisted/jingle/incoming-basics.py b/tests/twisted/jingle/incoming-basics.py
index d477779..6fe0c0a 100644
--- a/tests/twisted/jingle/incoming-basics.py
+++ b/tests/twisted/jingle/incoming-basics.py
@@ -6,9 +6,7 @@ import dbus
 
 from gabbletest import make_result_iq
 from servicetest import (
-    make_channel_proxy, unwrap, tp_path_prefix, EventPattern,
-    assertEquals, assertLength
-    )
+    make_channel_proxy, unwrap, EventPattern, assertEquals, assertLength)
 from jingletest2 import JingleTest2, test_all_dialects
 import constants as cs
 
@@ -178,7 +176,7 @@ def test(jp, q, bus, conn, stream):
 
     # 'Nuff said
     jt.terminate()
-    q.expect('dbus-signal', signal='Closed', path=path[len(tp_path_prefix):])
+    q.expect('dbus-signal', signal='Closed', path=path)
 
 if __name__ == '__main__':
     test_all_dialects(test)
diff --git a/tests/twisted/jingle/initial-audio-video.py b/tests/twisted/jingle/initial-audio-video.py
index 6f09ff8..bb4b9da 100644
--- a/tests/twisted/jingle/initial-audio-video.py
+++ b/tests/twisted/jingle/initial-audio-video.py
@@ -8,9 +8,7 @@ import operator
 
 from servicetest import (
     assertContains, assertEquals, assertLength,
-    wrap_channel, EventPattern, call_async, make_channel_proxy,
-    tp_path_prefix,
-    )
+    wrap_channel, EventPattern, call_async, make_channel_proxy)
 
 from jingletest2 import JingleTest2, test_all_dialects
 
@@ -137,10 +135,8 @@ def check_iav(jt, q, conn, bus, stream, remote_handle, initial_audio,
         jt.accept()
 
         events = reduce(operator.concat,
-            [ [ EventPattern('dbus-signal', signal='SetRemoteCodecs',
-                    path=p[len(tp_path_prefix):]),
-                EventPattern('dbus-signal', signal='SetStreamPlaying',
-                    path=p[len(tp_path_prefix):]),
+            [ [ EventPattern('dbus-signal', signal='SetRemoteCodecs', path=p),
+                EventPattern('dbus-signal', signal='SetStreamPlaying', path=p),
               ] for p in stream_handler_paths
             ], [])
         q.expect_many(*events)
diff --git a/tests/twisted/jingle/outgoing-many-streams.py b/tests/twisted/jingle/outgoing-many-streams.py
index 882bf7b..da9745c 100644
--- a/tests/twisted/jingle/outgoing-many-streams.py
+++ b/tests/twisted/jingle/outgoing-many-streams.py
@@ -8,7 +8,7 @@ import dbus
 
 from gabbletest import exec_test, sync_stream
 from servicetest import (
-    make_channel_proxy, tp_path_prefix, call_async, EventPattern)
+    make_channel_proxy, call_async, EventPattern)
 import jingletest
 import gabbletest
 
@@ -218,10 +218,10 @@ def test(q, bus, conn, stream):
 
     # Everything closes
     closes = [ EventPattern('dbus-signal', signal='Close',
-                   path=stream_handler_paths[i][len(tp_path_prefix):])
+                   path=stream_handler_paths[i])
                for i in range(0,7) ]
     removeds = [ EventPattern('dbus-signal', signal='StreamRemoved',
-                     args=[stream_ids[i]], path=path[len(tp_path_prefix):])
+                     args=[stream_ids[i]], path=path)
                for i in range(0,7) ]
     q.expect_many(
         EventPattern('dbus-signal', signal='ChannelClosed', args=[path]),
diff --git a/tests/twisted/jingle/preload-caps-crash.py b/tests/twisted/jingle/preload-caps-crash.py
index 252e8a4..8464d48 100644
--- a/tests/twisted/jingle/preload-caps-crash.py
+++ b/tests/twisted/jingle/preload-caps-crash.py
@@ -8,9 +8,7 @@ import dbus
 
 from gabbletest import make_result_iq, exec_test, sync_stream
 from servicetest import (
-    make_channel_proxy, unwrap, tp_path_prefix, EventPattern,
-    assertEquals, assertLength
-    )
+    make_channel_proxy, unwrap, EventPattern, assertEquals, assertLength)
 from jingletest2 import JingleTest2, GtalkProtocol03
 import constants as cs
 import ns
diff --git a/tests/twisted/jingle/stun-server.py b/tests/twisted/jingle/stun-server.py
index 36f6d64..fad761d 100644
--- a/tests/twisted/jingle/stun-server.py
+++ b/tests/twisted/jingle/stun-server.py
@@ -6,7 +6,7 @@ import dbus
 import socket
 
 from gabbletest import exec_test, make_result_iq, sync_stream, GoogleXmlStream
-from servicetest import make_channel_proxy, tp_path_prefix, EventPattern
+from servicetest import make_channel_proxy, EventPattern
 import jingletest
 import constants as cs
 
@@ -79,7 +79,7 @@ def test(q, bus, conn, stream,
     e = q.expect('dbus-signal', signal='NewStreamHandler')
     stream_handler = make_channel_proxy(conn, e.args[0], 'Media.StreamHandler')
 
-    media_chan = make_channel_proxy(conn, tp_path_prefix + e.path, 'Channel.Interface.Group')
+    media_chan = make_channel_proxy(conn, e.path, 'Channel.Interface.Group')
 
     # Exercise channel properties
     channel_props = media_chan.GetAll(
diff --git a/tests/twisted/jingle/test-content-adding-removal.py b/tests/twisted/jingle/test-content-adding-removal.py
index 15251ed..12aa4d6 100644
--- a/tests/twisted/jingle/test-content-adding-removal.py
+++ b/tests/twisted/jingle/test-content-adding-removal.py
@@ -7,9 +7,7 @@ closes the session.
 
 from gabbletest import make_result_iq, sync_stream
 from servicetest import (
-    wrap_channel, make_channel_proxy, tp_path_prefix, assertEquals,
-    EventPattern,
-    )
+    wrap_channel, make_channel_proxy, assertEquals, EventPattern)
 from jingletest2 import (
     JingleTest2, test_dialects, JingleProtocol031, JingleProtocol015,
     )
@@ -141,9 +139,7 @@ def test(jp, q, bus, conn, stream, peer_removes_final_content):
             predicate=jp.action_predicate('session-terminate')),
         # Gabble shouldn't wait for the peer to ack the terminate before
         # considering the call finished.
-        EventPattern('dbus-signal', signal='Closed',
-            path=path[len(tp_path_prefix):]),
-        )
+        EventPattern('dbus-signal', signal='Closed', path=path))
 
     # Only now does the peer ack the content-remove. This serves as a
     # regression test for contents outliving the session; if the content didn't
diff --git a/tests/twisted/jingle/test-content-complex.py b/tests/twisted/jingle/test-content-complex.py
index de4462b..9f97561 100644
--- a/tests/twisted/jingle/test-content-complex.py
+++ b/tests/twisted/jingle/test-content-complex.py
@@ -4,8 +4,7 @@ Test everything related to contents
 
 from gabbletest import sync_stream
 from servicetest import (
-    make_channel_proxy, tp_path_prefix, assertEquals, EventPattern,
-    )
+    make_channel_proxy, assertEquals, EventPattern)
 import constants as cs
 from jingletest2 import (
     JingleTest2, JingleProtocol015, JingleProtocol031, test_dialects)
@@ -48,9 +47,9 @@ def worker(jp, q, bus, conn, stream):
              args=[u'', [], [], [self_handle], [], remote_handle,
                    cs.GC_REASON_INVITED])
 
-    media_chan = make_channel_proxy(conn, tp_path_prefix + e.path, 'Channel.Interface.Group')
-    signalling_iface = make_channel_proxy(conn, tp_path_prefix + e.path, 'Channel.Interface.MediaSignalling')
-    media_iface = make_channel_proxy(conn, tp_path_prefix + e.path, 'Channel.Type.StreamedMedia')
+    media_chan = make_channel_proxy(conn, e.path, 'Channel.Interface.Group')
+    signalling_iface = make_channel_proxy(conn, e.path, 'Channel.Interface.MediaSignalling')
+    media_iface = make_channel_proxy(conn, e.path, 'Channel.Type.StreamedMedia')
 
     # S-E gets notified about new session handler, and calls Ready on it
     e = q.expect('dbus-signal', signal='NewSessionHandler')
diff --git a/tests/twisted/jingle/test-description-info.py b/tests/twisted/jingle/test-description-info.py
index 939e71c..f705b27 100644
--- a/tests/twisted/jingle/test-description-info.py
+++ b/tests/twisted/jingle/test-description-info.py
@@ -4,8 +4,8 @@ Test emition and handling of codec update using description-info
 
 from gabbletest import exec_test, sync_stream
 from servicetest import (
-    wrap_channel, assertEquals,
-    make_channel_proxy, unwrap, tp_path_prefix, EventPattern, call_async)
+    wrap_channel, assertEquals, make_channel_proxy, unwrap, EventPattern,
+    call_async)
 from jingletest2 import JingleTest2, JingleProtocol031
 import constants as cs
 
@@ -44,7 +44,7 @@ def test(q, bus, conn, stream, send_early_description_info=False):
              args=[u'', [], [], [self_handle], [], remote_handle,
                    cs.GC_REASON_INVITED])
 
-    chan = wrap_channel(bus.get_object(conn.bus_name, tp_path_prefix + e.path),
+    chan = wrap_channel(bus.get_object(conn.bus_name,  e.path),
         'StreamedMedia')
 
     # S-E gets notified about new session handler, and calls Ready on it
diff --git a/tests/twisted/jingle/test-incoming-call-reject.py b/tests/twisted/jingle/test-incoming-call-reject.py
index ff301a1..f2aa353 100644
--- a/tests/twisted/jingle/test-incoming-call-reject.py
+++ b/tests/twisted/jingle/test-incoming-call-reject.py
@@ -5,8 +5,7 @@ reason.
 
 from twisted.words.xish import xpath
 
-from servicetest import make_channel_proxy, tp_path_prefix, EventPattern, \
-    call_async
+from servicetest import make_channel_proxy, EventPattern, call_async
 from jingletest2 import JingleTest2, test_all_dialects
 
 import constants as cs
@@ -47,7 +46,7 @@ def test(jp, q, bus, conn, stream, busy):
     session_handler = make_channel_proxy(conn, e.args[0], 'Media.SessionHandler')
     session_handler.Ready()
 
-    media_chan = make_channel_proxy(conn, tp_path_prefix + e.path, 'Channel.Interface.Group')
+    media_chan = make_channel_proxy(conn, e.path, 'Channel.Interface.Group')
 
     # Exercise channel properties
     channel_props = media_chan.GetAll(cs.CHANNEL,
diff --git a/tests/twisted/muc/roomlist.py b/tests/twisted/muc/roomlist.py
index 38e5cd1..4f81b28 100644
--- a/tests/twisted/muc/roomlist.py
+++ b/tests/twisted/muc/roomlist.py
@@ -6,8 +6,7 @@ Test MUC support.
 import dbus
 
 from gabbletest import make_result_iq, exec_test, sync_stream, disconnect_conn
-from servicetest import call_async, EventPattern, \
-        tp_name_prefix, tp_path_prefix
+from servicetest import call_async, EventPattern, tp_name_prefix
 import constants as cs
 
 def test(q, bus, conn, stream):
@@ -170,10 +169,8 @@ def test(q, bus, conn, stream):
     assert ensured_path == path2, (ensured_path, path2)
 
     disconnect_conn(q, conn, stream, [
-    EventPattern('dbus-signal', signal='Closed',
-        path=path1[len(tp_path_prefix):]),
-    EventPattern('dbus-signal', signal='Closed',
-        path=path2[len(tp_path_prefix):]),
+    EventPattern('dbus-signal', signal='Closed', path=path1),
+    EventPattern('dbus-signal', signal='Closed', path=path2),
     EventPattern('dbus-signal', signal='ChannelClosed', args=[path1]),
     EventPattern('dbus-signal', signal='ChannelClosed', args=[path2])])
 
diff --git a/tests/twisted/roster/removed-from-rp-subscribe.py b/tests/twisted/roster/removed-from-rp-subscribe.py
index 1c6c33b..3a44640 100644
--- a/tests/twisted/roster/removed-from-rp-subscribe.py
+++ b/tests/twisted/roster/removed-from-rp-subscribe.py
@@ -4,7 +4,7 @@ Regression tests for rescinding outstanding subscription requests.
 
 from twisted.words.protocols.jabber.client import IQ
 
-from servicetest import tp_path_prefix, EventPattern, assertEquals
+from servicetest import EventPattern, assertEquals
 from gabbletest import exec_test, expect_list_channel, GoogleXmlStream
 import constants as cs
 import ns
@@ -47,8 +47,7 @@ def test(q, bus, conn, stream, remove, local):
 
     # In response, Gabble should add Marco to stored:
     q.expect('dbus-signal', signal='MembersChanged',
-        args=['', [h], [], [], [], 0, 0],
-        path=stored.object_path[len(tp_path_prefix):])
+        args=['', [h], [], [], [], 0, 0], path=stored.object_path)
 
     # Gajim sends a <presence type='subscribe'/> to Marco. 'As a result, the
     # user's server MUST initiate a second roster push to all of the user's
@@ -64,7 +63,7 @@ def test(q, bus, conn, stream, remove, local):
     # In response, Gabble should add Marco to subscribe:remote-pending:
     q.expect('dbus-signal', signal='MembersChanged',
         args=['', [], [], [], [h], 0, 0],
-        path=subscribe.object_path[len(tp_path_prefix):])
+        path=subscribe.object_path)
 
     # The user decides that they don't care what Marco's baking after all
     # (maybe they read his blog instead?) and:
@@ -100,10 +99,10 @@ def test(q, bus, conn, stream, remove, local):
         q.expect_many(
             EventPattern('dbus-signal', signal='MembersChanged',
                 args=['', [], [h], [], [], 0, 0],
-                path=subscribe.object_path[len(tp_path_prefix):]),
+                path=subscribe.object_path),
             EventPattern('dbus-signal', signal='MembersChanged',
                 args=['', [], [h], [], [], 0, 0],
-                path=stored.object_path[len(tp_path_prefix):]),
+                path=stored.object_path),
             )
     else:
         # ...rescinds the subscription request...
@@ -130,7 +129,7 @@ def test(q, bus, conn, stream, remove, local):
         # that it's never delivered.
         q.expect('dbus-signal', signal='MembersChanged',
             args=['', [], [h], [], [], 0, 0],
-            path=subscribe.object_path[len(tp_path_prefix):])
+            path=subscribe.object_path)
 
 def test_remove_local(q, bus, conn, stream):
     test(q, bus, conn, stream, remove=True, local=True)
diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index fd8d581..947381c 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -358,7 +358,7 @@ def make_connection(bus, event_func, name, proto, params):
         lambda *args, **kw:
             event_func(
                 Event('dbus-signal',
-                    path=unwrap(kw['path'])[len(tp_path_prefix):],
+                    path=unwrap(kw['path']),
                     signal=kw['member'], args=map(unwrap, args),
                     interface=kw['interface'])),
         None,       # signal name
diff --git a/tests/twisted/text/destroy.py b/tests/twisted/text/destroy.py
index 23398ce..8fcb918 100644
--- a/tests/twisted/text/destroy.py
+++ b/tests/twisted/text/destroy.py
@@ -8,7 +8,7 @@ import dbus
 from twisted.words.xish import domish
 
 from gabbletest import exec_test
-from servicetest import call_async, EventPattern, tp_path_prefix
+from servicetest import call_async, EventPattern
 import constants as cs
 
 def test(q, bus, conn, stream):
@@ -107,8 +107,8 @@ def test(q, bus, conn, stream):
     call_async(q, destroyable_iface, 'Destroy')
 
     event = q.expect('dbus-signal', signal='Closed')
-    assert tp_path_prefix + event.path == text_chan.object_path,\
-            (tp_path_prefix + event.path, text_chan.object_path)
+    assert event.path == text_chan.object_path,\
+            (event.path, text_chan.object_path)
 
     event = q.expect('dbus-return', method='Destroy')
 
diff --git a/tests/twisted/text/respawn.py b/tests/twisted/text/respawn.py
index 1dfd4fc..55ceb11 100644
--- a/tests/twisted/text/respawn.py
+++ b/tests/twisted/text/respawn.py
@@ -7,7 +7,7 @@ import dbus
 from twisted.words.xish import domish
 
 from gabbletest import exec_test
-from servicetest import call_async, EventPattern, tp_path_prefix
+from servicetest import call_async, EventPattern
 import constants as cs
 
 def test(q, bus, conn, stream):
@@ -106,8 +106,8 @@ def test(q, bus, conn, stream):
             EventPattern('dbus-signal', signal='Closed'),
             EventPattern('dbus-signal', signal='ChannelClosed'),
             )
-    assert tp_path_prefix + old.path == text_chan.object_path,\
-            (tp_path_prefix + old.path, text_chan.object_path)
+    assert old.path == text_chan.object_path,\
+            (old.path, text_chan.object_path)
     assert new.args[0] == text_chan.object_path,\
             (new.args[0], text_chan.object_path)
 
@@ -154,8 +154,8 @@ def test(q, bus, conn, stream):
     call_async(q, chan_iface, 'Close')
 
     event = q.expect('dbus-signal', signal='Closed')
-    assert tp_path_prefix + event.path == text_chan.object_path,\
-            (tp_path_prefix + event.path, text_chan.object_path)
+    assert event.path == text_chan.object_path,\
+            (event.path, text_chan.object_path)
 
     event = q.expect('dbus-return', method='Close')
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list