def test_external_link_compare_imdb_fail(self, browser_mock, base_init_mock, site_mock): site_mock.browser = browser_mock inserter = ListalRatingsInserter(None) inserter.site = site_mock inserter.site.site_name = 'Listal' inserter.failed_movies = [] result = inserter._compare_external_links(self.movie_details_page, self.movie, 'imdb.com', 'imdb') # pylint: disable=protected-access self.assertTrue(result)
def test_external_link_compare_imdb_success(self, browser_mock, base_init_mock, site_mock): site_mock.browser = browser_mock inserter = ListalRatingsInserter(None) inserter.site = site_mock inserter.site.site_name = 'Listal' inserter.failed_movies = [] movie2 = dict() movie2['title'] = 'The Simpsons' movie2['year'] = 2007 movie2['imdb'] = dict() movie2['imdb']['id'] = 'tt0462538' movie2['imdb']['url'] = 'http://www.imdb.com/title/tt0462538' movie2['imdb']['my_rating'] = 10 result = inserter._compare_external_links(self.movie_details_page, movie2, 'imdb.com', 'imdb') # pylint: disable=protected-access self.assertFalse(result)
def test_external_link_compare_imdb_success( self, browser_mock, base_init_mock, site_mock ): site_mock.browser = browser_mock inserter = ListalRatingsInserter(None) inserter.site = site_mock inserter.site.site_name = "Listal" inserter.failed_movies = [] movie2 = dict() movie2["title"] = "The Simpsons" movie2["year"] = 2007 movie2["imdb"] = dict() movie2["imdb"]["id"] = "tt0462538" movie2["imdb"]["url"] = "https://www.imdb.com/title/tt0462538" movie2["imdb"]["my_rating"] = 10 result = inserter._compare_external_links( self.movie_details_page, movie2, "imdb.com", "imdb" ) # pylint: disable=protected-access self.assertFalse(result)