summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Laban <david.laban@collabora.co.uk>2011-01-26 17:12:09 +0000
committerDavid Laban <david.laban@collabora.co.uk>2011-01-26 17:17:54 +0000
commit2cf3c1e745c27dd48d71b05e5daa68479333885b (patch)
tree51a96108a56eb630ae1326632ab5d2191cff5298 /tests
parentc10bee3f1c4f02f1ca758999ef420c21a4996443 (diff)
Fix group flags for streamedmedia calls.
We start off with lots of flags, and then delete them as we work out what kind of channel we are, rather than trying to track what we need to add/remove over time. We should always have the right flags before we are advertised on the bus. Note that adding members to a channel made using Create isn't *strictly* correct way to do it, but it isn't special-cased in any of the code, and I don't want to set flags that are lies so I've just updated the tests accordingly. Also, converting the flags to their binary representation makes failed assertions a lot easier to debug (and I honestly don't care about speed).
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/voip/incoming-basics.py7
-rw-r--r--tests/twisted/voip/outgoing-basics.py9
2 files changed, 7 insertions, 9 deletions
diff --git a/tests/twisted/voip/incoming-basics.py b/tests/twisted/voip/incoming-basics.py
index 0bc7c2b..c3cf8dd 100644
--- a/tests/twisted/voip/incoming-basics.py
+++ b/tests/twisted/voip/incoming-basics.py
@@ -86,13 +86,12 @@ def test(q, bus, conn, sip_proxy, peer='foo@bar.com'):
flags = group_props['GroupFlags']
assert flags & cs.GF_PROPERTIES, flags
- # FIXME #32189: sofiasip's group flags are borked.
# Changing members in any way other than adding or removing yourself is
# meaningless for incoming calls, and the flags need not be sent to change
# your own membership.
- #assert not flags & cs.GF_CAN_ADD, flags
- #assert not flags & cs.GF_CAN_REMOVE, flags
- #assert not flags & cs.GF_CAN_RESCIND, flags
+ assert not flags & cs.GF_CAN_ADD, flags
+ assert not flags & cs.GF_CAN_REMOVE, flags
+ assert not flags & cs.GF_CAN_RESCIND, flags
assert group_props['Members'] == [remote_handle], group_props['Members']
assert group_props['RemotePendingMembers'] == [], \
diff --git a/tests/twisted/voip/outgoing-basics.py b/tests/twisted/voip/outgoing-basics.py
index 2e90e92..933b4ad 100644
--- a/tests/twisted/voip/outgoing-basics.py
+++ b/tests/twisted/voip/outgoing-basics.py
@@ -147,15 +147,14 @@ def worker(q, bus, conn, sip_proxy, variant, peer):
# but we should be allowed to add the peer.
chan.Group.AddMembers([remote_handle], 'I love backwards compat')
- base_flags = cs.GF_PROPERTIES | cs.GF_MESSAGE_REMOVE \
- | cs.GF_MESSAGE_REJECT | cs.GF_MESSAGE_RESCIND
+ base_flags = cs.GF_PROPERTIES | cs.GF_CAN_REMOVE | cs.GF_CAN_RESCIND
- if variant == REQUEST_ANONYMOUS_AND_ADD or variant == REQUEST_ANONYMOUS:
+ if variant in [REQUEST_ANONYMOUS_AND_ADD, REQUEST_ANONYMOUS, CREATE]:
expected_flags = base_flags | cs.GF_CAN_ADD
else:
expected_flags = base_flags
- # FIXME: 32189: group flags are borked.
- #assertEquals(expected_flags, group_props['GroupFlags'])
+
+ assertEquals(bin(expected_flags), bin(group_props['GroupFlags']))
assertEquals({}, group_props['HandleOwners'])
assertEquals([], chan.StreamedMedia.ListStreams())