diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-24 02:20:18 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-24 16:45:37 +0200 |
| commit | 5e58b64668537603a0f40daf9e64f1ac8b4d89b6 (patch) | |
| tree | fc29337528abc18e0f7602cb60a13eb7651e4b1f /packages/meshbay-node/tests/test_tmdb_search_bound.py | |
| parent | 1ba95852f4365d166411f8e6db175db84ec06ec1 (diff) | |
| download | meshbay-5e58b64668537603a0f40daf9e64f1ac8b4d89b6.tar.gz | |
refactor(node): move the Videos catalogue handlers out of webrtc_server
VideoMetaMixin in transport/webrtc/apps/video_meta.py: media and season
meta, TMDB search and its per-member bound, posters, and the operator's
TMDB ops.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/tests/test_tmdb_search_bound.py')
| -rw-r--r-- | packages/meshbay-node/tests/test_tmdb_search_bound.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/meshbay-node/tests/test_tmdb_search_bound.py b/packages/meshbay-node/tests/test_tmdb_search_bound.py index 486a2c2..3153b15 100644 --- a/packages/meshbay-node/tests/test_tmdb_search_bound.py +++ b/packages/meshbay-node/tests/test_tmdb_search_bound.py @@ -21,7 +21,7 @@ simply declined to ask is a worse answer than the truth. """ import pytest -from meshbay_node.transport import webrtc_server +from meshbay_node.transport.webrtc.apps import video_meta from meshbay_node.transport.webrtc_server import WebRTCPeerSession GROUP = "g" * 32 @@ -97,8 +97,8 @@ async def test_a_member_at_the_ceiling_does_not_stop_another_one(node, monkeypat Alice exhausts her own window; Bob, who has typed nothing, must be served exactly as if she had not been there. """ - monkeypatch.setattr(webrtc_server, "_TMDB_SEARCH_PER_MEMBER", 3) - monkeypatch.setattr(webrtc_server, "_TMDB_SEARCH_NODE", 100) + monkeypatch.setattr(video_meta, "_TMDB_SEARCH_PER_MEMBER", 3) + monkeypatch.setattr(video_meta, "_TMDB_SEARCH_NODE", 100) ctx, tmdb = node alice = _member(ctx, "alice") @@ -119,8 +119,8 @@ async def test_one_member_cannot_spend_the_whole_node_quota(node, monkeypatch): because the operator's credential is one credential however many people hold the search box down. """ - monkeypatch.setattr(webrtc_server, "_TMDB_SEARCH_PER_MEMBER", 100) - monkeypatch.setattr(webrtc_server, "_TMDB_SEARCH_NODE", 2) + monkeypatch.setattr(video_meta, "_TMDB_SEARCH_PER_MEMBER", 100) + monkeypatch.setattr(video_meta, "_TMDB_SEARCH_NODE", 2) ctx, tmdb = node alice, bob = _member(ctx, "alice"), _member(ctx, "bob") @@ -138,8 +138,8 @@ async def test_a_members_count_survives_their_reconnection(node, monkeypatch): reconnect wide, and a client that drops its DataChannel between searches has no ceiling at all. """ - monkeypatch.setattr(webrtc_server, "_TMDB_SEARCH_PER_MEMBER", 2) - monkeypatch.setattr(webrtc_server, "_TMDB_SEARCH_NODE", 100) + monkeypatch.setattr(video_meta, "_TMDB_SEARCH_PER_MEMBER", 2) + monkeypatch.setattr(video_meta, "_TMDB_SEARCH_NODE", 100) ctx, tmdb = node first = _member(ctx, "alice") @@ -154,7 +154,7 @@ async def test_a_members_count_survives_their_reconnection(node, monkeypatch): async def test_a_refusal_is_said_out_loud_and_not_drawn_as_no_matches(node, monkeypatch): - monkeypatch.setattr(webrtc_server, "_TMDB_SEARCH_PER_MEMBER", 0) + monkeypatch.setattr(video_meta, "_TMDB_SEARCH_PER_MEMBER", 0) ctx, _ = node alice = _member(ctx, "alice") @@ -172,7 +172,7 @@ async def test_the_windows_do_not_grow_without_bound(node, monkeypatch): The lists are trimmed on every call, so the thing that bounds a member also bounds what remembering them costs. """ - monkeypatch.setattr(webrtc_server, "_TMDB_SEARCH_WINDOW", 0.0) + monkeypatch.setattr(video_meta, "_TMDB_SEARCH_WINDOW", 0.0) ctx, tmdb = node alice = _member(ctx, "alice") |