aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-23 13:51:41 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-23 13:51:56 +0100
commit8e3e03229e10cba8fe6ad7aa67d48c939a1c458a (patch)
tree269a48e0bee462703fb7733240a00e107850e1da /test
parent8958b6916cdf8b30b347972b452136cb9fdab679 (diff)
[YoutubeDL] fix tests (Closes #2036)
Diffstat (limited to 'test')
-rw-r--r--test/test_YoutubeDL.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py
index 3100c362a..5203a0273 100644
--- a/test/test_YoutubeDL.py
+++ b/test/test_YoutubeDL.py
@@ -78,12 +78,12 @@ class TestFormatSelection(unittest.TestCase):
ydl = YDL({'format_limit': 'good'})
assert ydl.params['format_limit'] == 'good'
- ydl.process_ie_result(info_dict)
+ ydl.process_ie_result(info_dict.copy())
downloaded = ydl.downloaded_info_dicts[0]
self.assertEqual(downloaded[u'format_id'], u'good')
ydl = YDL({'format_limit': 'great', 'format': 'all'})
- ydl.process_ie_result(info_dict)
+ ydl.process_ie_result(info_dict.copy())
self.assertEqual(ydl.downloaded_info_dicts[0][u'format_id'], u'meh')
self.assertEqual(ydl.downloaded_info_dicts[1][u'format_id'], u'good')
self.assertEqual(ydl.downloaded_info_dicts[2][u'format_id'], u'great')
@@ -91,7 +91,7 @@ class TestFormatSelection(unittest.TestCase):
ydl = YDL()
ydl.params['format_limit'] = 'excellent'
- ydl.process_ie_result(info_dict)
+ ydl.process_ie_result(info_dict.copy())
downloaded = ydl.downloaded_info_dicts[0]
self.assertEqual(downloaded[u'format_id'], u'excellent')
@@ -105,27 +105,27 @@ class TestFormatSelection(unittest.TestCase):
info_dict = {u'formats': formats, u'extractor': u'test'}
ydl = YDL({'format': u'20/47'})
- ydl.process_ie_result(info_dict)
+ ydl.process_ie_result(info_dict.copy())
downloaded = ydl.downloaded_info_dicts[0]
self.assertEqual(downloaded['format_id'], u'47')
ydl = YDL({'format': u'20/71/worst'})
- ydl.process_ie_result(info_dict)
+ ydl.process_ie_result(info_dict.copy())
downloaded = ydl.downloaded_info_dicts[0]
self.assertEqual(downloaded['format_id'], u'35')
ydl = YDL()
- ydl.process_ie_result(info_dict)
+ ydl.process_ie_result(info_dict.copy())
downloaded = ydl.downloaded_info_dicts[0]
self.assertEqual(downloaded['format_id'], u'2')
ydl = YDL({'format': u'webm/mp4'})
- ydl.process_ie_result(info_dict)
+ ydl.process_ie_result(info_dict.copy())
downloaded = ydl.downloaded_info_dicts[0]
self.assertEqual(downloaded['format_id'], u'47')
ydl = YDL({'format': u'3gp/40/mp4'})
- ydl.process_ie_result(info_dict)
+ ydl.process_ie_result(info_dict.copy())
downloaded = ydl.downloaded_info_dicts[0]
self.assertEqual(downloaded['format_id'], u'35')