]>
Commit | Line | Data |
---|---|---|
499bfcbf PH |
1 | import os |
2 | import sys | |
3 | import unittest | |
4 | sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
5 | ||
6 | ||
52efa4b3 | 7 | from yt_dlp.extractor import gen_extractor_classes |
8 | from yt_dlp.extractor.common import InfoExtractor | |
9 | ||
10 | NO_LOGIN = InfoExtractor._perform_login | |
499bfcbf PH |
11 | |
12 | ||
13 | class TestNetRc(unittest.TestCase): | |
14 | def test_netrc_present(self): | |
52efa4b3 | 15 | for ie in gen_extractor_classes(): |
16 | if ie._perform_login is NO_LOGIN: | |
499bfcbf PH |
17 | continue |
18 | self.assertTrue( | |
52efa4b3 | 19 | ie._NETRC_MACHINE, |
499bfcbf PH |
20 | 'Extractor %s supports login, but is missing a _NETRC_MACHINE property' % ie.IE_NAME) |
21 | ||
22 | ||
23 | if __name__ == '__main__': | |
24 | unittest.main() |