Exemplo n.º 1
0
 def test_scraping_show_with_movie_preference(self):
     scraper = server.WebScraper()
     with self.assertRaises(Exception) as context:
         scraper.scrape("jackass")
     self.assertTrue(
         "The correct tv show was not found. Try revising your search or adding tv at the end."
         in str(context.exception))
Exemplo n.º 2
0
 def fails_on_movie_search(self):
     scraper = server.WebScraper()
     with self.assertRaises(Exception) as context:
         scraper.scrape("Pirates of the Carribean")
     self.assertTrue(
         "The correct tv show was not found. Try revising your search or adding tv at the end."
         in str(context.exception))
Exemplo n.º 3
0
 def runs_successfully_with_show_with_no_synopsis(self):
     scraper = server.WebScraper()
     try:
         scraper.scrape("greys anatomy")
     except Exception:
         self.fail("Web scraper did not get a synopsis")
Exemplo n.º 4
0
 def runs_successfully_with_show_with_synopsis(self):
     scraper = server.WebScraper()
     try:
         scraper.scrape("game of thrones")
     except Exception:
         self.fail("Web scraper did not get a synopsis")
Exemplo n.º 5
0
 def test_scraping_show_with_tv_show_specification(self):
     scraper = server.WebScraper()
     try:
         scraper.scrape("jackass tv")
     except Exception:
         self.fail("Web scraper did not pick up a tv search!")