diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_download.py | 6 | ||||
| -rw-r--r-- | test/tests.json | 72 | 
2 files changed, 73 insertions, 5 deletions
| diff --git a/test/test_download.py b/test/test_download.py index 5877c42b3..14ac511d2 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -107,11 +107,7 @@ def generator(test_case):                  with io.open(tc['file'] + '.info.json', encoding='utf-8') as infof:                      info_dict = json.load(infof)                  for (info_field, value) in tc.get('info_dict', {}).items(): -                    if value.startswith('md5:'): -                        md5_info_value = hashlib.md5(info_dict.get(info_field, '')).hexdigest() -                        self.assertEqual(value[3:], md5_info_value) -                    else: -                        self.assertEqual(value, info_dict.get(info_field)) +                    self.assertEqual(value, info_dict.get(info_field))          finally:              for tc in test_cases:                  _try_rm(tc['file']) diff --git a/test/tests.json b/test/tests.json index 2c2137ce4..a46ff491b 100644 --- a/test/tests.json +++ b/test/tests.json @@ -225,5 +225,77 @@          "uploader_id": "ford-lopatin",          "location": "Spain"      } +  }, +  { +    "name": "Facebook", +    "url": "https://www.facebook.com/photo.php?v=120708114770723", +    "file": "120708114770723.mp4", +    "md5": "48975a41ccc4b7a581abd68651c1a5a8", +    "info_dict": { +      "title": "PEOPLE ARE AWESOME 2013", +      "duration": 279 +    } +  }, +  { +    "name": "EightTracks", +    "url": "http://8tracks.com/ytdl/youtube-dl-test-tracks-a", +    "playlist": [ +      { +        "file": "11885610.m4a", +        "md5": "96ce57f24389fc8734ce47f4c1abcc55", +        "info_dict": { +          "title": "youtube-dl test track 1 \"'/\\\u00e4\u21ad" +        } +      }, +      { +        "file": "11885608.m4a", +        "md5": "4ab26f05c1f7291ea460a3920be8021f", +        "info_dict": { +          "title": "youtube-dl test track 2 \"'/\\\u00e4\u21ad" +        } +      }, +      { +        "file": "11885679.m4a", +        "md5": "d30b5b5f74217410f4689605c35d1fd7", +        "info_dict": { +          "title": "youtube-dl test track 3 \"'/\\\u00e4\u21ad" +        } +      }, +      { +        "file": "11885680.m4a", +        "md5": "4eb0a669317cd725f6bbd336a29f923a", +        "info_dict": { +          "title": "youtube-dl test track 4 \"'/\\\u00e4\u21ad" +        } +      }, +      { +        "file": "11885682.m4a", +        "md5": "1893e872e263a2705558d1d319ad19e8", +        "info_dict": { +          "title": "youtube-dl test track 5 \"'/\\\u00e4\u21ad" +        } +      }, +      { +        "file": "11885683.m4a", +        "md5": "b673c46f47a216ab1741ae8836af5899", +        "info_dict": { +          "title": "youtube-dl test track 6 \"'/\\\u00e4\u21ad" +        } +      }, +      { +        "file": "11885684.m4a", +        "md5": "1d74534e95df54986da7f5abf7d842b7", +        "info_dict": { +          "title": "youtube-dl test track 7 \"'/\\\u00e4\u21ad" +        } +      }, +      { +        "file": "11885685.m4a", +        "md5": "f081f47af8f6ae782ed131d38b9cd1c0", +        "info_dict": { +          "title": "youtube-dl test track 8 \"'/\\\u00e4\u21ad" +        } +      } +    ]    }  ] | 
