Ejemplo n.º 1
0
 def _mock_console_input(self, isatty=True):
     with patch('streamlink_cli.console.sys.stdin.isatty',
                return_value=isatty):
         mock_console = MagicMock()
         mock_console.ask.return_value = "username"
         mock_console.askpass.return_value = "password"
         yield ConsoleUserInputRequester(mock_console)
Ejemplo n.º 2
0
def setup_streamlink():
    """Creates the Streamlink session."""
    global streamlink

    streamlink = Streamlink(
        {"user-input-requester": ConsoleUserInputRequester(console)})