From 280a284fb2bf3abf10d94a7abd71cecf6f62a141 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Sat, 20 Aug 2022 11:16:47 +0200 Subject: [PATCH] Expand clips tests --- tests/test_api.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 5cb4760..5220666 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -5,7 +5,7 @@ These tests depend on the channel having some videos and clips published. import httpx import m3u8 from twitchdl import twitch -from twitchdl.commands.download import _parse_playlists +from twitchdl.commands.download import _parse_playlists, get_clip_authenticated_url TEST_CHANNEL = "bananasaurus_rex" @@ -43,6 +43,8 @@ def test_get_clips(): assert clips["pageInfo"] assert len(clips["edges"]) > 0 - clip_slug = clips["edges"][0]["node"]["slug"] - clip = twitch.get_clip(clip_slug) - assert clip["slug"] == clip_slug + slug = clips["edges"][0]["node"]["slug"] + clip = twitch.get_clip(slug) + assert clip["slug"] == slug + + assert get_clip_authenticated_url(slug, "source")