diff --git a/app/tests/test_ytdl_utils.py b/app/tests/test_ytdl_utils.py index 06d6d50..a577339 100644 --- a/app/tests/test_ytdl_utils.py +++ b/app/tests/test_ytdl_utils.py @@ -24,6 +24,9 @@ class _ImpersonateTarget: fake_impersonate.ImpersonateTarget = _ImpersonateTarget fake_networking.impersonate = fake_impersonate +# The inner ``key`` group mirrors the real ``STR_FORMAT_RE_TMPL`` so that +# ``_OUTTMPL_FIELD_RE`` (compiled at import time) has the named group that +# ``_resolve_outtmpl_fields`` reads via ``match.group('key')``. fake_utils.STR_FORMAT_RE_TMPL = r"(?P)%\((?P(?P{}))\)(?P[-0-9.]*{})" fake_utils.STR_FORMAT_TYPES = "diouxXeEfFgGcrsa" fake_yt_dlp.networking = fake_networking