File size: 369 Bytes
d2c119a
cd0bfbf
d2c119a
 
 
 
82321d6
d2c119a
 
5afc31c
82321d6
5afc31c
1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- coding: utf-8 -*-
from unittest import mock

from pytube import YouTube


@mock.patch("pytube.__main__.YouTube")
def test_prefetch_deferred(MockYouTube):
    instance = MockYouTube.return_value
    instance.prefetch_descramble.return_value = None
    YouTube("https://www.youtube.com/watch?v=9bZkp7q19f0", True)
    assert not instance.prefetch_descramble.called