aboutsummaryrefslogtreecommitdiff
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-04-04 17:54:02 +0600
committerSergey M․ <dstftw@gmail.com>2015-04-04 17:54:02 +0600
commit536b94e56fdf0fd2dd1c6d6d92112866949505c4 (patch)
tree2a89f800c78fdb399b71fbe8d727cec1b8df016b /test/test_utils.py
parente9f65f87496d740fbb61e036c710bf2c174f1cc0 (diff)
parent5c29dbd0c76083eaf596f623fabb612575f71861 (diff)
downloadyoutube-dl-536b94e56fdf0fd2dd1c6d6d92112866949505c4.tar.xz
Merge branch 'snipem-gamersyde'
Diffstat (limited to 'test/test_utils.py')
-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 abaf1ab73..4e524aca3 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -470,6 +470,12 @@ class TestUtil(unittest.TestCase):
self.assertEqual(d['x'], 1)
self.assertEqual(d['y'], 'a')
+ on = js_to_json('["abc", "def",]')
+ self.assertEqual(json.loads(on), ['abc', 'def'])
+
+ on = js_to_json('{"abc": "def",}')
+ self.assertEqual(json.loads(on), {'abc': 'def'})
+
def test_clean_html(self):
self.assertEqual(clean_html('a:\nb'), 'a: b')
self.assertEqual(clean_html('a:\n "b"'), 'a: "b"')