[Telepathy-commits] [telepathy-gabble/master] check if the right D-Bus error is raised when requesting a view channel without MaxSize property

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Oct 10 03:40:10 PDT 2008


---
 tests/twisted/olpc/olpc-activity-search.py |   10 ++++++++++
 tests/twisted/olpc/olpc-buddy-search.py    |    9 +++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/olpc/olpc-activity-search.py b/tests/twisted/olpc/olpc-activity-search.py
index 7116dbe..66573fa 100644
--- a/tests/twisted/olpc/olpc-activity-search.py
+++ b/tests/twisted/olpc/olpc-activity-search.py
@@ -515,5 +515,15 @@ def test(q, bus, conn, stream):
 
     close_view(q, view3, '3')
 
+    # View request without MaxSize property
+    call_async(q, requests_iface, 'CreateChannel',
+        { 'org.freedesktop.Telepathy.Channel.ChannelType':
+            'org.laptop.Telepathy.Channel.Type.ActivityView',
+          })
+
+    event = q.expect('dbus-error', method='CreateChannel')
+    assert event.error.get_dbus_name() == 'org.freedesktop.Telepathy.Errors.InvalidArgument'
+
+
 if __name__ == '__main__':
     exec_test(test)
diff --git a/tests/twisted/olpc/olpc-buddy-search.py b/tests/twisted/olpc/olpc-buddy-search.py
index 49cc431..b45789a 100644
--- a/tests/twisted/olpc/olpc-buddy-search.py
+++ b/tests/twisted/olpc/olpc-buddy-search.py
@@ -395,5 +395,14 @@ def test(q, bus, conn, stream):
     # close view 2
     close_view(q, view3, '3')
 
+    # View request without MaxSize property
+    call_async(q, requests_iface, 'CreateChannel',
+        { 'org.freedesktop.Telepathy.Channel.ChannelType':
+            'org.laptop.Telepathy.Channel.Type.BuddyView',
+          })
+
+    event = q.expect('dbus-error', method='CreateChannel')
+    assert event.error.get_dbus_name() == 'org.freedesktop.Telepathy.Errors.InvalidArgument'
+
 if __name__ == '__main__':
     exec_test(test)
-- 
1.5.6.5




More information about the Telepathy-commits mailing list