aboutsummaryrefslogtreecommitdiff
path: root/test/test_update.py
diff options
context:
space:
mode:
authorbashonly <88596187+bashonly@users.noreply.github.com>2023-12-21 15:06:26 -0600
committerGitHub <noreply@github.com>2023-12-21 21:06:26 +0000
commit632b8ee54eb2df8ac6e20746a0bd95b7ebb053aa (patch)
treecc770f88892dcddbd3ff8e8fbedd15e37c57b4b6 /test/test_update.py
parentc919b68f7e79ea5010f75f648d3c9e45405a8011 (diff)
[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
Diffstat (limited to 'test/test_update.py')
-rw-r--r--test/test_update.py9
1 files changed, 9 insertions, 0 deletions
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