telepathy-gabble: push-from-contact: stop using the old roster API

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Tue Oct 8 12:53:34 PDT 2013


Module: telepathy-gabble
Branch: master
Commit: db960b774b142270cb8cdddfd801c442f0931fff
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=db960b774b142270cb8cdddfd801c442f0931fff

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue Oct  8 13:50:43 2013 -0400

push-from-contact: stop using the old roster API

---

 tests/twisted/roster/push-from-contact.py |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/tests/twisted/roster/push-from-contact.py b/tests/twisted/roster/push-from-contact.py
index 54926ac..1fb369e 100644
--- a/tests/twisted/roster/push-from-contact.py
+++ b/tests/twisted/roster/push-from-contact.py
@@ -4,9 +4,7 @@ Ensure that Gabble correctly ignores roster pushes from contacts.
 
 from servicetest import EventPattern
 from gabbletest import exec_test, acknowledge_iq
-from rostertest import (
-    make_roster_push, expect_contact_list_signals, check_contact_list_signals,
-)
+from rostertest import make_roster_push
 import ns
 import constants as cs
 
@@ -17,10 +15,7 @@ def test(q, bus, conn, stream):
     event = q.expect('stream-iq', query_ns=ns.ROSTER)
     acknowledge_iq(stream, event.stanza)
 
-    pairs = expect_contact_list_signals(q, bus, conn,
-            ['stored'])
-    stored = check_contact_list_signals(q, bus, conn, pairs.pop(0),
-            cs.HT_LIST, 'stored', [])
+    q.expect('dbus-signal', signal='ContactListStateChanged', args=[cs.CONTACT_LIST_STATE_SUCCESS])
 
     # Some malicious peer sends us a roster push to try to trick us into
     # showing them on our roster. Gabble should know better than to trust it.
@@ -29,8 +24,7 @@ def test(q, bus, conn, stream):
     stream.send(iq)
 
     q.forbid_events(
-        [ EventPattern('dbus-signal', signal='MembersChanged',
-              path=stored.object_path),
+        [
           EventPattern('dbus-signal', signal='ContactsChanged'),
         ])
 



More information about the telepathy-commits mailing list