telepathy-gabble: groups.py: use check_contact_roster()

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Thu Oct 10 11:50:13 PDT 2013


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

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue Oct  8 18:11:37 2013 -0400

groups.py: use check_contact_roster()

---

 tests/twisted/roster/groups.py |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/twisted/roster/groups.py b/tests/twisted/roster/groups.py
index 772c4f5..3225151 100644
--- a/tests/twisted/roster/groups.py
+++ b/tests/twisted/roster/groups.py
@@ -5,7 +5,8 @@ Test basic roster group functionality.
 from gabbletest import exec_test, acknowledge_iq, sync_stream
 from servicetest import (EventPattern, assertEquals, call_async,
         sync_dbus, assertContains, assertDoesNotContain)
-from rostertest import groups_changed_predicate, groups_created_predicate
+from rostertest import (groups_changed_predicate, groups_created_predicate,
+        check_contact_roster)
 import constants as cs
 import ns
 
@@ -162,13 +163,8 @@ def test(q, bus, conn, stream):
 
             sync_dbus(bus, q, conn)
             sync_stream(q, stream)
-            assertEquals({
-                    cs.CONN_IFACE_CONTACT_GROUPS + '/groups':
-                        ['ladies', 'people starting with A'],
-                    cs.CONN + '/contact-id':
-                        'amy at foo.com' },
-                conn.Contacts.GetContactAttributes([amy],
-                    [cs.CONN_IFACE_CONTACT_GROUPS], False)[amy])
+
+            check_contact_roster(conn, 'amy at foo.com', ['ladies', 'people starting with A'])
 
     # sanity check: after all that, we expect Amy to be in group 'ladies' only
     sync_dbus(bus, q, conn)



More information about the telepathy-commits mailing list