Ejemplo n.º 1
0
 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']
Ejemplo n.º 2
0
 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'
     ]
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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