From fa45c35f7c482b7899ad8847f4c35f0be9645856 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 3 Oct 2013 14:46:38 +0200 Subject: [PATCH 2/8] remove roster/ensure.py Group channels have been removed in Telepathy 1.0 --- tests/twisted/Makefile.am | 1 - tests/twisted/roster/ensure.py | 53 ------------------------------------------ 2 files changed, 54 deletions(-) delete mode 100644 tests/twisted/roster/ensure.py diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am index 975aa64..c3b50b5 100644 --- a/tests/twisted/Makefile.am +++ b/tests/twisted/Makefile.am @@ -77,7 +77,6 @@ TWISTED_TESTS = \ pubsub.py \ roster/authorize.py \ roster/edit-before-roster.py \ - roster/ensure.py \ roster/groups-12791.py \ roster/groups.py \ roster/initial-aliases.py \ diff --git a/tests/twisted/roster/ensure.py b/tests/twisted/roster/ensure.py deleted file mode 100644 index 514991e..0000000 --- a/tests/twisted/roster/ensure.py +++ /dev/null @@ -1,53 +0,0 @@ -""" -Test ensuring roster channels -""" - -from gabbletest import exec_test -from servicetest import call_async -import constants as cs -import ns - -def test(q, bus, conn, stream): - roster_event = q.expect('stream-iq', query_ns=ns.ROSTER) - roster_event.stanza['type'] = 'result' - - call_async(q, conn, "RequestHandles", cs.HT_GROUP, ['test']) - - event = q.expect('dbus-return', method='RequestHandles') - test_handle = event.value[0][0] - - # send an empty roster - stream.send(roster_event.stanza) - - call_async(q, conn.Requests, 'EnsureChannel', - { cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_CONTACT_LIST, - cs.TARGET_HANDLE_TYPE: cs.HT_GROUP, - cs.TARGET_HANDLE: test_handle, - }) - call_async(q, conn.Requests, 'EnsureChannel', - { cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_CONTACT_LIST, - cs.TARGET_HANDLE_TYPE: cs.HT_GROUP, - cs.TARGET_HANDLE: test_handle, - }) - - ret = q.expect('dbus-return', method='EnsureChannel') - ret2 = q.expect('dbus-return', method='EnsureChannel') - - # We don't test the NewChannels signal here - depending on exact timing, - # it might happen between the two EnsureChannel calls, or after the second - # one. - - yours, path, props = ret.value - yours2, path2, props2 = ret2.value - - assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_CONTACT_LIST, props - assert props[cs.TARGET_HANDLE_TYPE] == cs.HT_GROUP, props - assert props[cs.TARGET_HANDLE] == test_handle, props - assert props[cs.TARGET_ID] == 'test', props - - assert yours != yours2, (yours, yours2) - assert path == path2, (path, path2) - assert props == props2, (props, props2) - -if __name__ == '__main__': - exec_test(test) -- 1.8.3.1