]> jfr.im git - yt-dlp.git/blame - test/test_netrc.py
[compat] Remove more functions
[yt-dlp.git] / test / test_netrc.py
CommitLineData
499bfcbf
PH
1import os
2import sys
3import unittest
f8271158 4
499bfcbf
PH
5sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
6
7
52efa4b3 8from yt_dlp.extractor import gen_extractor_classes
9from yt_dlp.extractor.common import InfoExtractor
10
11NO_LOGIN = InfoExtractor._perform_login
499bfcbf
PH
12
13
14class TestNetRc(unittest.TestCase):
15 def test_netrc_present(self):
52efa4b3 16 for ie in gen_extractor_classes():
17 if ie._perform_login is NO_LOGIN:
499bfcbf
PH
18 continue
19 self.assertTrue(
52efa4b3 20 ie._NETRC_MACHINE,
499bfcbf
PH
21 'Extractor %s supports login, but is missing a _NETRC_MACHINE property' % ie.IE_NAME)
22
23
24if __name__ == '__main__':
25 unittest.main()