Expand clips tests

This commit is contained in:
Ivan Habunek 2022-08-20 11:16:47 +02:00
parent 235b13c257
commit 280a284fb2
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -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")