aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-07-04 21:36:32 +0100
committerRemita Amine <remitamine@gmail.com>2016-07-04 21:36:32 +0100
commitdfaa86b75e6fd7596c52f85f96bf38de9208c1d2 (patch)
treeefcf7d012ad4c172e9c41723f6c29ecfcbe6ca86 /test
parentd9163ae3b6626fa08ae7eee297e97316813ae22c (diff)
[test_utils] add test for smuggling a smuggled url
Diffstat (limited to 'test')
-rw-r--r--test/test_utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index ed61e4c27..85928dbc2 100644
--- 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)
+ 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'""")