diff options
author | Jaime Marquínez Ferrándiz <[email protected]> | 2013-11-03 11:56:45 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <[email protected]> | 2013-11-03 11:57:04 +0100 |
commit | b6c45014aed4b3176be1142958be98d7cb9dbaff (patch) | |
tree | 082ff641d900f347c6854679d309306476d0482a /test | |
parent | 3e56add7c9acf659d984be5aef1b8fb6e42599c6 (diff) | |
download | youtube-dl-b6c45014aed4b3176be1142958be98d7cb9dbaff.tar.gz youtube-dl-b6c45014aed4b3176be1142958be98d7cb9dbaff.zip |
Set the extra_info inside YoutubeDL.process_ie_result and set only if the keys are missing
Diffstat (limited to 'test')
-rw-r--r-- | test/test_YoutubeDL.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index ffebb4ae5..58cf9c313 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -128,6 +128,18 @@ class TestFormatSelection(unittest.TestCase): downloaded = ydl.downloaded_info_dicts[0] self.assertEqual(downloaded['format_id'], u'35') + def test_add_extra_info(self): + test_dict = { + 'extractor': 'Foo', + } + extra_info = { + 'extractor': 'Bar', + 'playlist': 'funny videos', + } + YDL.add_extra_info(test_dict, extra_info) + self.assertEqual(test_dict['extractor'], 'Foo') + self.assertEqual(test_dict['playlist'], 'funny videos') + if __name__ == '__main__': unittest.main() |