Esempio n. 1
0
 def test_parse_title_with_media_type(self):
     example_title = "The Sopranos (1999 TV Series)"
     exp_title = "The Sopranos"
     exp_year_released = 1999
     exp_media_type = "tv-series"
     act_title, act_year_released, act_media_type = IMDBUserRatings._parse_title_year_media_type(example_title)
     self.assertEqual(exp_title, act_title)
     self.assertEqual(exp_year_released, act_year_released)
     self.assertEqual(exp_media_type, act_media_type)
Esempio n. 2
0
 def test_parse_title_without_media_type(self):
     example_title = "Star Wars: Episode VII - The Force Awakens (2015)"
     exp_title = "Star Wars: Episode VII - The Force Awakens"
     exp_year_released = 2015
     exp_media_type = "movie"
     act_title, act_year_released, act_media_type = IMDBUserRatings._parse_title_year_media_type(example_title)
     self.assertEqual(exp_title, act_title)
     self.assertEqual(exp_year_released, act_year_released)
     self.assertEqual(exp_media_type, act_media_type)
Esempio n. 3
0
 def test_parse_title_with_media_type(self):
     example_title = "The Sopranos (1999 TV Series)"
     exp_title = "The Sopranos"
     exp_year_released = 1999
     exp_media_type = "tv-series"
     act_title, act_year_released, act_media_type = IMDBUserRatings._parse_title_year_media_type(
         example_title)
     self.assertEqual(exp_title, act_title)
     self.assertEqual(exp_year_released, act_year_released)
     self.assertEqual(exp_media_type, act_media_type)
Esempio n. 4
0
 def test_parse_title_without_media_type(self):
     example_title = "Star Wars: Episode VII - The Force Awakens (2015)"
     exp_title = "Star Wars: Episode VII - The Force Awakens"
     exp_year_released = 2015
     exp_media_type = "movie"
     act_title, act_year_released, act_media_type = IMDBUserRatings._parse_title_year_media_type(
         example_title)
     self.assertEqual(exp_title, act_title)
     self.assertEqual(exp_year_released, act_year_released)
     self.assertEqual(exp_media_type, act_media_type)