aboutsummaryrefslogtreecommitdiff
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-03-07 15:25:33 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-03-07 15:25:33 +0100
commitb74fa8cd2c9deb412ac277c6cc44847c3839b844 (patch)
tree65d60faab0da7de5906edd2a623b3382a496a607 /test/test_utils.py
parent94eae04c94a43847e8ce7c9bf3d88dd029ef62f6 (diff)
[facebook] Fix login process
It was broken and didn't work in python 3. And use `_download_webpage` instead of `compat_urllib_request.urlopen`.
Diffstat (limited to 'test/test_utils.py')
-rw-r--r--test/test_utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index 4e3c37fb4..7ee74e36c 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -33,6 +33,7 @@ from youtube_dl.utils import (
unified_strdate,
unsmuggle_url,
url_basename,
+ urlencode_postdata,
xpath_with_ns,
)
@@ -261,5 +262,9 @@ class TestUtil(unittest.TestCase):
bam''')
self.assertEqual(read_batch_urls(f), [u'foo', u'bar', u'baz', u'bam'])
+ def test_urlencode_postdata(self):
+ data = urlencode_postdata({'username': 'foo@bar.com', 'password': '1234'})
+ self.assertTrue(isinstance(data, bytes))
+
if __name__ == '__main__':
unittest.main()