[Telepathy-commits] [telepathy-gabble/master] remove HAVE_DBUS_TUBES checks from twisted tests
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Dec 4 09:39:40 PST 2008
---
tests/twisted/tubes/ensure-si-tube.py | 2 --
tests/twisted/tubes/test-get-available-tubes.py | 12 +++---------
tests/twisted/tubes/test-muc-offer-dbus-tube.py | 5 +----
tests/twisted/tubes/test-si-tubes.py | 8 --------
4 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/tests/twisted/tubes/ensure-si-tube.py b/tests/twisted/tubes/ensure-si-tube.py
index 068ee29..610942f 100644
--- a/tests/twisted/tubes/ensure-si-tube.py
+++ b/tests/twisted/tubes/ensure-si-tube.py
@@ -18,8 +18,6 @@ from twisted.internet.protocol import Factory, Protocol
from twisted.internet import reactor
from twisted.words.protocols.jabber.client import IQ
-from gabbleconfig import HAVE_DBUS_TUBES
-
NS_TUBES = 'http://telepathy.freedesktop.org/xmpp/tubes'
NS_SI = 'http://jabber.org/protocol/si'
NS_FEATURE_NEG = 'http://jabber.org/protocol/feature-neg'
diff --git a/tests/twisted/tubes/test-get-available-tubes.py b/tests/twisted/tubes/test-get-available-tubes.py
index 37fa64a..c3808c3 100644
--- a/tests/twisted/tubes/test-get-available-tubes.py
+++ b/tests/twisted/tubes/test-get-available-tubes.py
@@ -7,8 +7,6 @@ from gabbletest import exec_test, make_result_iq, acknowledge_iq
from twisted.words.xish import domish
-from gabbleconfig import HAVE_DBUS_TUBES
-
sample_parameters = dbus.Dictionary({
's': 'hello',
'ay': dbus.ByteArray('hello'),
@@ -92,13 +90,9 @@ def test(q, bus, conn, stream):
# test GetAvailableTubeTypes
tube_types = tubes_iface_muc.GetAvailableTubeTypes()
- if HAVE_DBUS_TUBES:
- assert len(tube_types) == 2
- assert 0 in tube_types # D-Bus tube
- assert 1 in tube_types # Stream tube
- else:
- assert len(tube_types) == 1
- assert 1 in tube_types # Stream tube
+ assert len(tube_types) == 2
+ assert 0 in tube_types # D-Bus tube
+ assert 1 in tube_types # Stream tube
# test GetAvailableStreamTubeTypes
stream_tubes_types = tubes_iface_muc.GetAvailableStreamTubeTypes()
diff --git a/tests/twisted/tubes/test-muc-offer-dbus-tube.py b/tests/twisted/tubes/test-muc-offer-dbus-tube.py
index 000c2a7..9746831 100644
--- a/tests/twisted/tubes/test-muc-offer-dbus-tube.py
+++ b/tests/twisted/tubes/test-muc-offer-dbus-tube.py
@@ -11,8 +11,6 @@ from gabbletest import exec_test, make_result_iq, acknowledge_iq
from twisted.words.xish import domish, xpath
-from gabbleconfig import HAVE_DBUS_TUBES
-
sample_parameters = dbus.Dictionary({
's': 'hello',
'ay': dbus.ByteArray('hello'),
@@ -235,5 +233,4 @@ def test(q, bus, conn, stream):
q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
if __name__ == '__main__':
- if HAVE_DBUS_TUBES:
- exec_test(test)
+ exec_test(test)
diff --git a/tests/twisted/tubes/test-si-tubes.py b/tests/twisted/tubes/test-si-tubes.py
index ace124b..df8b8be 100644
--- a/tests/twisted/tubes/test-si-tubes.py
+++ b/tests/twisted/tubes/test-si-tubes.py
@@ -17,8 +17,6 @@ from twisted.internet.protocol import Factory, Protocol
from twisted.internet import reactor
from twisted.words.protocols.jabber.client import IQ
-from gabbleconfig import HAVE_DBUS_TUBES
-
NS_TUBES = 'http://telepathy.freedesktop.org/xmpp/tubes'
NS_SI = 'http://jabber.org/protocol/si'
NS_FEATURE_NEG = 'http://jabber.org/protocol/feature-neg'
@@ -621,9 +619,6 @@ def test(q, bus, conn, stream):
binary = base64.b64decode(str(ibb_data))
assert binary == 'hello, world'
- if not HAVE_DBUS_TUBES:
- return
-
# have the fake client open the stream
# New tube API
iq = IQ(stream, 'set')
@@ -657,9 +652,6 @@ def test(q, bus, conn, stream):
binary = base64.b64decode(str(ibb_data))
assert binary == 'hello, new world'
- if not HAVE_DBUS_TUBES:
- return
-
# OK, how about D-Bus?
call_async(q, tubes_iface, 'OfferDBusTube',
'com.example.TestCase', sample_parameters)
--
1.5.6.5
More information about the Telepathy-commits
mailing list