@@ -39,7 +39,7 @@ def test_calc_duration(mocker): # type: ignore [no-untyped-def]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_gen_tracks(mocker): # type: ignore [no-untyped-def]
|
||||
async def test_gen_tracks(mocker, fake_track): # type: ignore [no-untyped-def]
|
||||
"""Test the gen_tracks asynchronous generator."""
|
||||
mock_downloader = mocker.patch(
|
||||
"playlist.plex.server._downloader",
|
||||
@@ -49,7 +49,7 @@ async def test_gen_tracks(mocker): # type: ignore [no-untyped-def]
|
||||
mock_models = mocker.patch("playlist.plex.server.models")
|
||||
mock_calc_delay = mocker.patch("playlist.plex.server.calc_delay")
|
||||
mock_calc_duration = mocker.patch("playlist.plex.server.calc_duration")
|
||||
mock_downloader.return_value = (1, ["Not a real track"])
|
||||
mock_downloader.return_value = (1, [fake_track])
|
||||
|
||||
async def fake_gen_batch_params(*args): # type: ignore
|
||||
for item in [(0, 1), (1, 1)]:
|
||||
|
||||
Reference in New Issue
Block a user