6 from yt_dlp
.networking
import RequestHandler
7 from yt_dlp
.networking
.common
import _REQUEST_HANDLERS
8 from yt_dlp
.utils
._utils
import _YDLLogger
as FakeLogger
13 RH_KEY
= request
.param
14 if inspect
.isclass(RH_KEY
) and issubclass(RH_KEY
, RequestHandler
):
16 elif RH_KEY
in _REQUEST_HANDLERS
:
17 handler
= _REQUEST_HANDLERS
[RH_KEY
]
19 pytest
.skip(f
'{RH_KEY} request handler is not available')
21 return functools
.partial(handler
, logger
=FakeLogger
)
24 def validate_and_send(rh
, req
):