[next] telepathy-gabble: tests: give signature explicitly when calling optional interfaces

Simon McVittie smcv at kemper.freedesktop.org
Wed May 7 02:18:40 PDT 2014


Module: telepathy-gabble
Branch: next
Commit: 9032c68babc53d3ebc470e836f856542ece7c340
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=9032c68babc53d3ebc470e836f856542ece7c340

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri Apr 11 13:39:16 2014 +0100

tests: give signature explicitly when calling optional interfaces

Our regression tests use dbus-python, which uses
Introspectable.Introspect() when the proxy is first constructed.
When telepathy-glib passed a static list of "every possible interface"
to either dbus-glib or GDBus on object-creation, this was sufficient.

However, now that we only add interfaces when we discover
that the server can support them, those interfaces won't have been in
the initial Introspect() result. We could construct a new proxy to
force re-introspection, but it's easier (and nicer) to be explicit
about types.

---

 tests/twisted/mail-notification.py         |    4 ++--
 tests/twisted/roster/test-google-roster.py |    6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/twisted/mail-notification.py b/tests/twisted/mail-notification.py
index a56eee2..2150b2b 100644
--- a/tests/twisted/mail-notification.py
+++ b/tests/twisted/mail-notification.py
@@ -201,11 +201,11 @@ def test_google_featured(q, bus, conn, stream):
     # Check the we can get an URL for a specific mail
     mail_url1 = conn.MailNotification.RequestMailURL(
             stored_mail1['id'],
-            stored_mail1['url-data']);
+            stored_mail1['url-data'], signature='sv')
 
     mail_url2 = conn.MailNotification.RequestMailURL(
             stored_mail2['id'],
-            stored_mail2['url-data']);
+            stored_mail2['url-data'], signature='sv')
     
     assert mail_url1[0] == thread1_url
     assert mail_url1[1] == 0
diff --git a/tests/twisted/roster/test-google-roster.py b/tests/twisted/roster/test-google-roster.py
index 08a569e..b258fec 100644
--- a/tests/twisted/roster/test-google-roster.py
+++ b/tests/twisted/roster/test-google-roster.py
@@ -366,7 +366,8 @@ def test_deny_overlap_one(q, bus, conn, stream):
     q.forbid_events(remove_events)
 
     # But then we have a falling out. In a blind rage, I block Bob:
-    call_async(q, conn.ContactBlocking, 'BlockContacts', [handle], "")
+    call_async(q, conn.ContactBlocking, 'BlockContacts', [handle], False,
+            signature='aub')
     event = q.expect('stream-iq', query_ns=ns.ROSTER)
     item = event.query.firstChildElement()
     assertEquals(contact, item['jid'])
@@ -450,7 +451,8 @@ def test_deny_overlap_two(q, bus, conn, stream):
         ]
     q.forbid_events(patterns)
 
-    call_async(q, conn.ContactBlocking, 'BlockContacts', [handle], "")
+    call_async(q, conn.ContactBlocking, 'BlockContacts', [handle], False,
+            signature='aub')
     call_async(q, conn.ContactList, 'RemoveContacts', [handle])
 
     # Make sure if the edits are sent prematurely, we've got them.



More information about the telepathy-commits mailing list