def assert_talk_details(self, talk_url, expected_video_url, expected_title, expected_speaker, expect_plot, expect_json): video_url, title, speaker, plot, talk_json = talk_scraper.get(test_util.get_HTML(talk_url)) self.assertEqual(expected_video_url, video_url) self.assertEqual(expected_title, title) self.assertEqual(expected_speaker, speaker) if (expect_plot): self.assertTrue(plot) # Not None or empty else: self.assertIsNone(plot) if expect_json: self.assertTrue(talk_json) # Not None or empty else: self.assertIsNone(talk_json)
def test(): talk_scraper.get(html);
def assert_custom_quality_url(self, talk_html, video_quality, expected_video_url): video_url, title, speaker, plot, talk_json = talk_scraper.get(talk_html, video_quality) self.assertEqual(expected_video_url, video_url)
def __get_talk_json__(self, url): html = urllib.urlopen(url).read() foo, fi, fo, fum, talk_json = talk_scraper.get(html) return talk_json
def test(): talk_scraper.get(html)
def assert_custom_quality_url(self, talk_html, video_quality, expected_video_url): video_url, title, speaker, plot, talk_json = talk_scraper.get( talk_html, video_quality) self.assertEqual(expected_video_url, video_url)