learningequality / ricecooker

Python library for creating Kolibri channels and uploading to Studio
https://ricecooker.readthedocs.io/
MIT License
19 stars 54 forks source link

YouTube download is unmocked in tests #522

Closed jredrejo closed 1 month ago

jredrejo commented 2 months ago

Observed behavior

Ricecooker tests are failing due to YouTube errors

Errors and logs

WARNING  ERROR: [youtube] zzJLYK893gQ: Sign in to confirm you’re not a bot. This helps protect our community. Learn more
ERROR    ==> [YouTubeTypes.YOUTUBE_VIDEO (test-video)] Failed to extract YouTube info

Expected behavior

ricecooker tests should pass

User-facing consequences

Chef scripts using YouTube links will need an account to sign in before retrieving the content

rtibbles commented 2 months ago

The issue here is specific to the IPs allocated to github actions. The proper solution here is to mock yt-dlp in our tests rather than actually trying to download from the live site