Changes the test for the free-trial courses

This commit is contained in:
Kerruba 2018-04-29 23:16:16 +01:00
parent 20d3041565
commit f51e50d546

View File

@ -104,12 +104,12 @@ class FrontEndMasterIE(FrontEndMasterBaseIE):
_VALID_URL = r'https?://(?:www\.)?frontendmasters\.com/courses/(?P<courseid>[a-z\-]+)/(?P<id>[a-z\-]+)/?' _VALID_URL = r'https?://(?:www\.)?frontendmasters\.com/courses/(?P<courseid>[a-z\-]+)/(?P<id>[a-z\-]+)/?'
_NETRC_MACHINE = 'frontend-masters' _NETRC_MACHINE = 'frontend-masters'
_TEST = { _TEST = {
'url': 'https://frontendmasters.com/courses/content-strategy/introduction/', 'url': 'https://frontendmasters.com/courses/javascript-basics/introduction/',
'md5': '5f176d4f170778524f40a06307a929f6', 'md5': 'a47be6ea0a384cbbb10fab10061f43d6',
'info_dict': { 'info_dict': {
'id': 'introduction', 'id': 'introduction',
'title': 'Introduction', 'title': 'Introduction',
'display_id': 'content-strategy', 'display_id': 'javascript-basics',
'ext': 'mp4' 'ext': 'mp4'
}, },
'skip': 'Requires FrontendMasters account credentials' 'skip': 'Requires FrontendMasters account credentials'
@ -247,21 +247,14 @@ class FrontEndMasterCourseIE(FrontEndMasterBaseIE):
_VALID_URL = r'https?://(?:www\.)?frontendmasters\.com/courses/(?P<id>[a-z\-]+)/?' _VALID_URL = r'https?://(?:www\.)?frontendmasters\.com/courses/(?P<id>[a-z\-]+)/?'
_NETRC_MACHINE = 'frontend-masters' _NETRC_MACHINE = 'frontend-masters'
_TESTS = [{ _TEST = {
'url': 'https://frontendmasters.com/courses/content-strategy/', 'url': 'https://frontendmasters.com/courses/javascript-basics/',
'info_dict': { 'info_dict': {
'id': 'content-strategy', 'id': 'content-strategy',
'title': 'Content Strategy', 'title': 'Introduction to JavaScript Programming',
'description': 'md5:7916149d4539c5d6fa86ff43a5df213b'
}, },
'playlist_count': 31, 'playlist_count': 19,
}, { }
'url': 'https://frontendmasters.com/courses/sql-fundamentals/',
'only_matching': True,
}, {
'url': 'https://frontendmasters.com/courses/introduction-to-javascript-jquery/',
'only_matching': True,
}]
def _real_extract(self, url): def _real_extract(self, url):
course_id = self._match_id(url) course_id = self._match_id(url)