projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d9163ae
)
[test_utils] add test for smuggling a smuggled url
author
Remita Amine
<remitamine@gmail.com>
Mon, 4 Jul 2016 20:36:32 +0000
(21:36 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Mon, 4 Jul 2016 20:36:32 +0000
(21:36 +0100)
test/test_utils.py
patch
|
blob
|
history
diff --git
a/test/test_utils.py
b/test/test_utils.py
index ed61e4c2751c82c062db6339b4245cb4cae6c9bf..85928dbc2357567c51a2fe87468c3a8361825a03 100644
(file)
--- a/
test/test_utils.py
+++ b/
test/test_utils.py
@@
-405,6
+405,12
@@
class TestUtil(unittest.TestCase):
self.assertEqual(res_url, url)
self.assertEqual(res_data, None)
self.assertEqual(res_url, url)
self.assertEqual(res_data, None)
+ smug_url = smuggle_url(url, {'a': 'b'})
+ smug_smug_url = smuggle_url(smug_url, {'c': 'd'})
+ res_url, res_data = unsmuggle_url(smug_smug_url)
+ self.assertEqual(res_url, url)
+ self.assertEqual(res_data, {'a': 'b', 'c': 'd'})
+
def test_shell_quote(self):
args = ['ffmpeg', '-i', encodeFilename('ñ€ß\'.mp4')]
self.assertEqual(shell_quote(args), """ffmpeg -i 'ñ€ß'"'"'.mp4'""")
def test_shell_quote(self):
args = ['ffmpeg', '-i', encodeFilename('ñ€ß\'.mp4')]
self.assertEqual(shell_quote(args), """ffmpeg -i 'ñ€ß'"'"'.mp4'""")