aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2016-03-03 19:18:57 +0100
committerremitamine <remitamine@gmail.com>2016-03-03 19:18:57 +0100
commit3201a67f618f3bb7b13b4df2a9c7f68f481940a4 (patch)
tree9751debbd6a40272bddfee17d476b3269bcc8b18 /test
parentfb640d0a3d3af77e6835d9a6a2bf80920785511a (diff)
[test/test_utils] add more tests for update_url_query
Diffstat (limited to 'test')
-rw-r--r--test/test_utils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index 19a546619..2bcf8ecf0 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -481,6 +481,15 @@ class TestUtil(unittest.TestCase):
self.assertEqual(query_dict(update_url_query(
'http://example.com/path', {'fields': b'id,formats,subtitles'})),
query_dict('http://example.com/path?fields=id,formats,subtitles'))
+ self.assertEqual(query_dict(update_url_query(
+ 'http://example.com/path', {'width': 1080, 'height': 720})),
+ query_dict('http://example.com/path?width=1080&height=720'))
+ self.assertEqual(query_dict(update_url_query(
+ 'http://example.com/path', {'bitrate': 5020.43})),
+ query_dict('http://example.com/path?bitrate=5020.43'))
+ self.assertEqual(query_dict(update_url_query(
+ 'http://example.com/path', {'test': '第二行тест'})),
+ query_dict('http://example.com/path?test=%E7%AC%AC%E4%BA%8C%E8%A1%8C%D1%82%D0%B5%D1%81%D1%82'))
def test_dict_get(self):
FALSE_VALUES = {