]> jfr.im git - yt-dlp.git/blobdiff - test/test_update.py
[test] Skip source address tests if the address cannot be bound to (#8900)
[yt-dlp.git] / test / test_update.py
index 2a5647e44a26f6e1e48f25c41ca844bb986da751..bc139562f4a44019d445ee849fd323c46b6e1aea 100644 (file)
@@ -9,7 +9,15 @@
 
 
 from test.helper import FakeYDL, report_warning
-from yt_dlp.update import Updater, UpdateInfo
+from yt_dlp.update import UpdateInfo, Updater
+
+
+# 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': {
@@ -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