From 632b8ee54eb2df8ac6e20746a0bd95b7ebb053aa Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:06:26 -0600 Subject: [core] Release workflow and Updater cleanup (#8640) - Only use trusted publishing with PyPI and remove support for PyPI tokens from release workflow - Clean up improper actions syntax in the build workflow inputs - Refactor Updater to allow for consistent unit testing with `UPDATE_SOURCES` Authored by: bashonly --- test/test_update.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/test_update.py b/test/test_update.py index 2a5647e44..a5a388c10 100644 --- a/test/test_update.py +++ b/test/test_update.py @@ -11,6 +11,14 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL, report_warning from yt_dlp.update import Updater, UpdateInfo + +# XXX: Keep in sync with yt_dlp.update.UPDATE_SOURCES +TEST_UPDATE_SOURCES = { + 'stable': 'yt-dlp/yt-dlp', + 'nightly': 'yt-dlp/yt-dlp-nightly-builds', + 'master': 'yt-dlp/yt-dlp-master-builds', +} + TEST_API_DATA = { 'yt-dlp/yt-dlp/latest': { 'tag_name': '2023.12.31', @@ -104,6 +112,7 @@ class FakeUpdater(Updater): _channel = 'stable' _origin = 'yt-dlp/yt-dlp' + _update_sources = TEST_UPDATE_SOURCES def _download_update_spec(self, *args, **kwargs): return TEST_LOCKFILE_ACTUAL -- cgit v1.2.3