Skip to content

Commit

Permalink
answer sdp のテストを更新する
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Sep 16, 2024
1 parent 86fbe57 commit 44b8f7f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions tests/test_simulcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
from client import Sendonly


@pytest.fixture(params=[
("VP8", "SimulcastEncoderAdapter (libvpx, libvpx, libvpx)"),
("VP9", "SimulcastEncoderAdapter (libvpx, libvpx, libvpx)"),
("AV1", "SimulcastEncoderAdapter (libaom, libaom, libaom)")
])
@pytest.fixture(
params=[
("VP8", "SimulcastEncoderAdapter (libvpx, libvpx, libvpx)"),
("VP9", "SimulcastEncoderAdapter (libvpx, libvpx, libvpx)"),
("AV1", "SimulcastEncoderAdapter (libaom, libaom, libaom)"),
]
)
def video_codec_params(request):
return request.param

Expand Down Expand Up @@ -43,6 +45,11 @@ def test_simulcast(setup, video_codec_params):

sendonly.disconnect()

# "type": "answer" の SDP で Simulcast があるかどうか
assert sendonly.answer_message is not None
assert "sdp" in sendonly.answer_message
assert "a=simulcast:send r0;r1;r2" in sendonly.answer_message["sdp"]

# codec が無かったら StopIteration 例外が上がる
sendonly_codec_stats = next(s for s in sendonly_stats if s.get("type") == "codec")
assert sendonly_codec_stats["mimeType"] == f"video/{video_codec}"
Expand Down

0 comments on commit 44b8f7f

Please sign in to comment.