mirror of
				https://github.com/ytdl-org/youtube-dl.git
				synced 2025-10-29 09:26:20 -07:00 
			
		
		
		
	Allow playlist test definitions in test_download.
This moves playlist tests where they belong, i.e. to the extractors themselves. Additionally, all our network interaction configuration for tests in test_download now applies to playlist tests as well.
This commit is contained in:
		| @@ -117,8 +117,9 @@ def expect_info_dict(self, expected_dict, got_dict): | ||||
|                 u'invalid value for field %s, expected %r, got %r' % (info_field, expected, got)) | ||||
|  | ||||
|     # Check for the presence of mandatory fields | ||||
|     for key in ('id', 'url', 'title', 'ext'): | ||||
|         self.assertTrue(got_dict.get(key), 'Missing mandatory field %s' % key) | ||||
|     if got_dict.get('_type') != 'playlist': | ||||
|         for key in ('id', 'url', 'title', 'ext'): | ||||
|             self.assertTrue(got_dict.get(key), 'Missing mandatory field %s' % key) | ||||
|     # Check for mandatory fields that are automatically set by YoutubeDL | ||||
|     for key in ['webpage_url', 'extractor', 'extractor_key']: | ||||
|         self.assertTrue(got_dict.get(key), u'Missing field: %s' % key) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user