def test_local_crawl(self): starting_url = 'usher/tests/gutersloh_showtimes_test_1.html' expected_output = json.load(open('usher/tests/gutersloh_showtimes.json')) googlemovies = GoogleMovies(starting_url, None, True, 'crawl') assert googlemovies.to_json() == expected_output assert googlemovies.crawled_urls == ['usher/tests/gutersloh_showtimes_test_1.html', 'usher/tests/gutersloh_showtimes_test_2.html']
def test_local_crawl(self): starting_url = 'usher/tests/gutersloh_showtimes_test_1.html' expected_output = json.load( open('usher/tests/gutersloh_showtimes.json')) googlemovies = GoogleMovies(starting_url, None, True, 'crawl') assert googlemovies.to_json() == expected_output assert googlemovies.crawled_urls == [ 'usher/tests/gutersloh_showtimes_test_1.html', 'usher/tests/gutersloh_showtimes_test_2.html' ]
def test_to_json_1(self): url = 'usher/tests/gutersloh_showtimes_test_1.html' expected_output = json.load(open('usher/tests/gutersloh_showtimes.json'))[0] googlemovies = GoogleMovies(url, None, True, 'scrape') assert googlemovies.to_json()[0] == expected_output
def test_to_json_1(self): url = 'usher/tests/gutersloh_showtimes_test_1.html' expected_output = json.load( open('usher/tests/gutersloh_showtimes.json'))[0] googlemovies = GoogleMovies(url, None, True, 'scrape') assert googlemovies.to_json()[0] == expected_output