summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPekka Pessi <Pekka.Pessi@nokia.com>2011-01-31 23:54:47 +0200
committerPekka Pessi <Pekka.Pessi@nokia.com>2011-02-02 17:22:06 +0200
commit253b4a1144888f7d6b72ff8217e56ba61d515c51 (patch)
treef8453d30b6b0e0488deb78977fffbfd9a0cd037f /tests
parenta5028ee9a77c8ed30f8fbc8ee4bc0aea09d1a46e (diff)
test-self-alias.py: check if Aliasing interface is visible in Contacts
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/test-self-alias.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/twisted/test-self-alias.py b/tests/twisted/test-self-alias.py
index 2eb4e7f..6c2e0a8 100644
--- a/tests/twisted/test-self-alias.py
+++ b/tests/twisted/test-self-alias.py
@@ -8,6 +8,8 @@ from servicetest import tp_name_prefix
import dbus
TEXT_TYPE = tp_name_prefix + '.Channel.Type.Text'
+ALIASING_INTERFACE = tp_name_prefix + '.Connection.Interface.Aliasing'
+CONTACTS_INTERFACE = tp_name_prefix + '.Connection.Interface.Contacts'
def test(q, bus, conn, sip_proxy):
conn.Connect()
@@ -23,6 +25,14 @@ def test(q, bus, conn, sip_proxy):
args=[[(self_handle, u'foo@bar.baz')]])
handle = conn.RequestHandles(1, ['sip:user@somewhere.com'])[0]
+
+ assert ALIASING_INTERFACE in \
+ conn.Properties.Get(CONTACTS_INTERFACE, "ContactAttributeInterfaces")
+ attrs = conn.Contacts.GetContactAttributes([self_handle, handle],
+ [ALIASING_INTERFACE], False)
+ assert ALIASING_INTERFACE + "/alias" in attrs[self_handle]
+ assert attrs[self_handle][ALIASING_INTERFACE + "/alias"] == u'foo@bar.baz'
+
conn.RequestChannel(TEXT_TYPE, 1, handle, True)
event = q.expect('dbus-signal', signal='NewChannel')