summaryrefslogtreecommitdiff
path: root/tests/twisted/caps/caps-cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/twisted/caps/caps-cache.py')
-rw-r--r--tests/twisted/caps/caps-cache.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/twisted/caps/caps-cache.py b/tests/twisted/caps/caps-cache.py
index 9c63e03b6..0102d5ceb 100644
--- a/tests/twisted/caps/caps-cache.py
+++ b/tests/twisted/caps/caps-cache.py
@@ -12,7 +12,8 @@ import constants as cs
import ns
from caps_helper import (
compute_caps_hash, fake_client_dataforms, presence_and_disco,
- send_presence, expect_disco, send_disco_reply)
+ send_presence, expect_disco, send_disco_reply,
+ assert_rccs_callable, get_contacts_capabilities_sync)
from config import VOIP_ENABLED
@@ -31,13 +32,16 @@ features = [
def expect_caps(q, conn, h):
# we can now do audio and video calls
- event = q.expect('dbus-signal', signal='CapabilitiesChanged')
+ cc, = q.expect_many(
+ EventPattern('dbus-signal', signal='ContactCapabilitiesChanged',
+ predicate=lambda e: h in e.args[0]),
+ )
+ assert_rccs_callable(cc.args[0][h], require_video=True)
check_caps(conn, h)
def check_caps(conn, h):
- assertContains((h, cs.CHANNEL_TYPE_STREAMED_MEDIA, 3,
- cs.MEDIA_CAP_AUDIO | cs.MEDIA_CAP_VIDEO),
- conn.Capabilities.GetCapabilities([h]))
+ caps = get_contacts_capabilities_sync(conn, [h])
+ assert_rccs_callable(caps[h], require_video=True)
def update_contact_caps(q, conn, stream, contact, caps, disco = True,
dataforms = {}, initial = True):