Skip to content

Commit

Permalink
Added test for stripping of whitespaces in SDP lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Wulff committed Jun 22, 2010
1 parent f3adb84 commit 0e34d0c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_sdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,15 @@ def test_multiple_lines_with_same_type(self):
sessionDescription, _ = parseSdpMessage(
"v=0\no=foo1\ns=test\ni=test\no=foo2\nt=12345\n")
assert_equals(sessionDescription["o"], "foo2")

def test_stripping(self):
"""Test for correct stripping of whitespaces from SDP lines"""
sessionDescription, mediaDescriptions = parseSdpMessage(
"v=0\n\t\t o=1 2 3 4 5 6\n s=Subject \t\ni= Info \n" + \
" \t m=audio 41000 RTP/AVP 0\t \t")

assert_equals(sessionDescription["v"], "0")
assert_equals(sessionDescription["o"], "1 2 3 4 5 6")
assert_equals(sessionDescription["s"], "Subject")
assert_equals(sessionDescription["i"], "Info")
assert_equals(mediaDescriptions[0]["m"], "audio 41000 RTP/AVP 0")

0 comments on commit 0e34d0c

Please sign in to comment.