summaryrefslogtreecommitdiff
path: root/tests/twisted/avahi/tubes/disabled-1-1-tubes.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/twisted/avahi/tubes/disabled-1-1-tubes.py')
-rw-r--r--tests/twisted/avahi/tubes/disabled-1-1-tubes.py62
1 files changed, 0 insertions, 62 deletions
diff --git a/tests/twisted/avahi/tubes/disabled-1-1-tubes.py b/tests/twisted/avahi/tubes/disabled-1-1-tubes.py
deleted file mode 100644
index a30acd56..00000000
--- a/tests/twisted/avahi/tubes/disabled-1-1-tubes.py
+++ /dev/null
@@ -1,62 +0,0 @@
-"""
-Test if 1-1 tubes support is properly disabled.
-This test should be removed as soon as we re-enable 1-1 tubes support.
-"""
-from saluttest import exec_test, wait_for_contact_in_publish
-from avahitest import AvahiAnnouncer, AvahiListener
-from avahitest import get_host_name
-import avahi
-import dbus
-import os
-import errno
-import string
-
-from xmppstream import setup_stream_listener, connect_to_stream
-from servicetest import make_channel_proxy, Event
-
-from twisted.words.xish import xpath, domish
-from twisted.internet.protocol import Factory, Protocol, ClientCreator
-from twisted.internet import reactor
-
-import constants as cs
-
-PUBLISHED_NAME="test-tube"
-
-CHANNEL_TYPE_TUBES = "org.freedesktop.Telepathy.Channel.Type.Tubes"
-HT_CONTACT = 1
-HT_CONTACT_LIST = 3
-TEXT_MESSAGE_TYPE_NORMAL = dbus.UInt32(0)
-SOCKET_ADDRESS_TYPE_UNIX = dbus.UInt32(0)
-SOCKET_ADDRESS_TYPE_IPV4 = dbus.UInt32(2)
-SOCKET_ACCESS_CONTROL_LOCALHOST = dbus.UInt32(0)
-
-sample_parameters = dbus.Dictionary({
- 's': 'hello',
- 'ay': dbus.ByteArray('hello'),
- 'u': dbus.UInt32(123),
- 'i': dbus.Int32(-123),
- }, signature='sv')
-
-def test(q, bus, conn):
- conn.Connect()
- q.expect('dbus-signal', signal='StatusChanged', args=[0L, 0L])
- basic_txt = { "txtvers": "1", "status": "avail" }
-
- contact_name = PUBLISHED_NAME + get_host_name()
- listener, port = setup_stream_listener(q, contact_name)
-
- announcer = AvahiAnnouncer(contact_name, "_presence._tcp", port, basic_txt)
-
- handle = wait_for_contact_in_publish(q, bus, conn, contact_name)
-
- # we can't request 1-1 tubes channel
- try:
- conn.RequestChannel(CHANNEL_TYPE_TUBES, HT_CONTACT, handle,
- True)
- except dbus.DBusException, e:
- assert e.get_dbus_name() == cs.NOT_IMPLEMENTED
- else:
- assert False, "Should raise NotImplemented error"
-
-if __name__ == '__main__':
- exec_test(test)