youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

test_netrc.py (635B)


      1 # coding: utf-8
      2 from __future__ import unicode_literals
      3 
      4 import os
      5 import sys
      6 import unittest
      7 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
      8 
      9 
     10 from youtube_dl.extractor import (
     11     gen_extractors,
     12 )
     13 
     14 
     15 class TestNetRc(unittest.TestCase):
     16     def test_netrc_present(self):
     17         for ie in gen_extractors():
     18             if not hasattr(ie, '_login'):
     19                 continue
     20             self.assertTrue(
     21                 hasattr(ie, '_NETRC_MACHINE'),
     22                 'Extractor %s supports login, but is missing a _NETRC_MACHINE property' % ie.IE_NAME)
     23 
     24 
     25 if __name__ == '__main__':
     26     unittest.main()