]>
Raphaƫl G. Git Repositories - youtubedl/blob - test/test_options.py
3 from __future__
import unicode_literals
5 # Allow direct execution
9 sys
.path
.insert(0, os
.path
.dirname(os
.path
.dirname(os
.path
.abspath(__file__
))))
11 from youtube_dl
.options
import _hide_login_info
14 class TestOptions(unittest
.TestCase
):
15 def test_hide_login_info(self
):
16 self
.assertEqual(_hide_login_info(['-u', 'foo', '-p', 'bar']),
17 ['-u', 'PRIVATE', '-p', 'PRIVATE'])
18 self
.assertEqual(_hide_login_info(['-u']), ['-u'])
19 self
.assertEqual(_hide_login_info(['-u', 'foo', '-u', 'bar']),
20 ['-u', 'PRIVATE', '-u', 'PRIVATE'])
21 self
.assertEqual(_hide_login_info(['--username=foo']),
22 ['--username=PRIVATE'])
25 if __name__
== '__main__':