[telepathy-gabble/master] More pedantic RCC content testing
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Tue Dec 29 05:34:49 PST 2009
---
tests/twisted/constants.py | 1 +
tests/twisted/jingle/outgoing-basics.py | 22 ++++++++++++++++------
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index d5460e1..7388d50 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -53,6 +53,7 @@ IMMUTABLE_STREAMS = CHANNEL_TYPE_STREAMED_MEDIA + '.ImmutableStreams'
CALL_INITIAL_AUDIO = CHANNEL_TYPE_CALL + '.InitialAudio'
CALL_INITIAL_VIDEO = CHANNEL_TYPE_CALL + '.InitialVideo'
+CALL_MUTABLE_CONTENTS = CHANNEL_TYPE_CALL + '.MutableContents'
CONN = "org.freedesktop.Telepathy.Connection"
CONN_IFACE_AVATARS = CONN + '.Interface.Avatars'
diff --git a/tests/twisted/jingle/outgoing-basics.py b/tests/twisted/jingle/outgoing-basics.py
index edb7f4b..bfa6c9b 100644
--- a/tests/twisted/jingle/outgoing-basics.py
+++ b/tests/twisted/jingle/outgoing-basics.py
@@ -282,8 +282,14 @@ def rccs(q, bus, conn, stream):
assertContains(cs.TARGET_HANDLE, allowed)
assertContains(cs.TARGET_ID, allowed)
- assertContains (cs.INITIAL_VIDEO, allowed)
- assertContains (cs.INITIAL_AUDIO, allowed)
+ expected_allowed = [
+ cs.TARGET_ID, cs.TARGET_HANDLE,
+ cs.INITIAL_VIDEO, cs.INITIAL_AUDIO
+ ]
+
+ allowed.sort()
+ expected_allowed.sort()
+ assertEquals(expected_allowed, allowed)
# Test Channel.Type.Call
media_classes = [ rcc for rcc in rccs
@@ -294,11 +300,15 @@ def rccs(q, bus, conn, stream):
assertEquals(cs.HT_CONTACT, fixed[cs.TARGET_HANDLE_TYPE])
- assertContains(cs.TARGET_HANDLE, allowed)
- assertContains(cs.TARGET_ID, allowed)
+ expected_allowed = [
+ cs.TARGET_ID, cs.TARGET_HANDLE,
+ cs.CALL_INITIAL_VIDEO, cs.CALL_INITIAL_AUDIO,
+ cs.CALL_MUTABLE_CONTENTS
+ ]
- assertContains (cs.CALL_INITIAL_VIDEO, allowed)
- assertContains (cs.CALL_INITIAL_AUDIO, allowed)
+ allowed.sort()
+ expected_allowed.sort()
+ assertEquals(expected_allowed, allowed)
if __name__ == '__main__':
exec_test(rccs)
--
1.5.6.5
More information about the telepathy-commits
mailing list