diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-02-21 21:17:24 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-02-21 21:17:24 -0500 |
commit | 9e13142105e97d34ea7dbf449587d0b4f7e02f64 (patch) | |
tree | c88c1a06afde56d26701fa27cdbebf97ca9abba8 | |
parent | 6cd12d15d12b4a88f05cb54c27b7867e551194ab (diff) |
Check for direction when verifying SDP
-rw-r--r-- | tests/twisted/voip/voip_test.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/twisted/voip/voip_test.py b/tests/twisted/voip/voip_test.py index 13794f9..8ad3cae 100644 --- a/tests/twisted/voip/voip_test.py +++ b/tests/twisted/voip/voip_test.py @@ -1,6 +1,7 @@ import dbus import uuid +import re import twisted.protocols.sip @@ -103,9 +104,14 @@ class VoipTestContext(object): codec_ids = ' '.join(codec_id_list) (component, ip, port, info) = self.remote_candidates[0] + pattern = '.*' for m in medias: mediatype = m[0] - assert self._mline_template % locals() in sdp_string + pattern += self._mline_template % locals() + pattern += '.*' + if m[1]: + pattern += 'a=' + m[1] + '.*' + assert re.search(pattern, sdp_string, re.MULTILINE | re.DOTALL) def send_message(self, message_type, body='', to_=None, from_=None, **additional_headers): |