From dfaa86b75e6fd7596c52f85f96bf38de9208c1d2 Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Mon, 4 Jul 2016 21:36:32 +0100 Subject: [PATCH] [test_utils] add test for smuggling a smuggled url --- test/test_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) 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'""") -- 2.22.2