Skip to content

Commit

Permalink
リファクタリング
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Nov 10, 2024
1 parent bea2c1b commit 8e4b777
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions tests/test_authz.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ def test_sendonly_authz_video_true(setup):
secret,
algorithm="HS256",
)
metadata = {"access_token": access_token}

sendonly = SoraClient(
signaling_urls,
SoraRole.SENDONLY,
channel_id,
audio=True,
video=False,
metadata=metadata,
metadata={"access_token": access_token},
)
sendonly.connect(fake_video=False, fake_audio=True)

Expand Down Expand Up @@ -92,15 +91,14 @@ def test_sendonly_authz_video_codec_type(setup, video_codec_params):
secret,
algorithm="HS256",
)
metadata = {"access_token": access_token}

sendonly = SoraClient(
signaling_urls,
SoraRole.SENDONLY,
channel_id,
audio=False,
video=True,
metadata=metadata,
metadata={"access_token": access_token},
)
sendonly.connect(fake_video=True)

Expand Down
6 changes: 2 additions & 4 deletions tests/test_sora_disconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ def test_websocket_signaling_only_lifetime_expired(setup):
secret,
algorithm="HS256",
)
metadata = {"access_token": access_token}

with SoraClient(
signaling_urls,
SoraRole.RECVONLY,
channel_id,
audio=True,
video=True,
metadata=metadata,
metadata={"access_token": access_token},
data_channel_signaling=False,
ignore_disconnect_websocket=False,
) as conn:
Expand Down Expand Up @@ -143,15 +142,14 @@ def test_websocket_datachannel_signaling_lifetime_expired(setup):
secret,
algorithm="HS256",
)
metadata = {"access_token": access_token}

with SoraClient(
signaling_urls,
SoraRole.RECVONLY,
channel_id,
audio=True,
video=True,
metadata=metadata,
metadata={"access_token": access_token},
data_channel_signaling=True,
ignore_disconnect_websocket=False,
) as conn:
Expand Down

0 comments on commit 8e4b777

Please sign in to comment.