From: Remita Amine Date: Mon, 4 Jul 2016 20:36:32 +0000 (+0100) Subject: [test_utils] add test for smuggling a smuggled url X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=dfaa86b75e6fd7596c52f85f96bf38de9208c1d2;p=youtube-dl [test_utils] add test for smuggling a smuggled url --- 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'""")