Пример #1
0
    def test_zap2it_id(self):
        """It should be possible to load the show using the zap2it id"""
        api = TVDB("B43FF87DE395DF56")

        show = api.get_series('EP00859795', 'en', 'zap2it')
        self.assertEqual(show.seriesid, 79349)  # Dexter

        show = api.get_series(859795, 'en', 'zap2it')
        self.assertEqual(show.seriesid, 79349)  # Dexter
Пример #2
0
    def test_imdb_id(self):
        """It should be possible to use the imdb id to get the series"""
        api = TVDB("B43FF87DE395DF56")

        show = api.get_series(773262, 'en', 'imdb')
        self.assertEqual(show.seriesid, 79349)  # Dexter

        show = api.get_series('tt0773262', 'en', 'imdb')
        self.assertEqual(show.seriesid, 79349)  # Dexter
Пример #3
0
    def test_get(self):
        """Provided the show id, you should be able to get the show object"""
        api = TVDB("B43FF87DE395DF56")
        show = api.get_series(79349, "en")

        self.assertEqual(show.SeriesName, "Dexter")
        self.assertEqual(show.id, 79349)
Пример #4
0
    def test_get(self):
        """Provided the show id, you should be able to get the show object"""
        api = TVDB("B43FF87DE395DF56")
        show = api.get_series(79349, "en")

        self.assertEqual(show.SeriesName, "Dexter")
        self.assertEqual(show.id, 79349)
    def test_no_actors(self):
        """
        The Show instance should have an empty actor_objects when the
        actor data has not been loaded.
        """
        api = TVDB("B43FF87DE395DF56", actors=False)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        self.assertEqual(len(show.actor_objects), 0)
Пример #6
0
    def test_no_actors(self):
        """
        The Show instance should have an empty actor_objects when the
        actor data has not been loaded.
        """
        api = TVDB("B43FF87DE395DF56", actors=False)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        self.assertEqual(len(show.actor_objects), 0)
Пример #7
0
    def test_get_series(self):
        """
        It should be possible to use the get_series alias to get a show
        given the right show id.
        """
        api = TVDB("B43FF87DE395DF56")
        show = api.get_series(79349, "en")

        self.assertEqual(show.SeriesName, "Dexter")
        self.assertEqual(show.id, 79349)
    def test_insensitive_attributes(self):
        """If selected, it should be possible to access the attributes in a case insensitive manner"""

        api = TVDB("B43FF87DE395DF56", actors=True, ignore_case=True)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        actor = show.actor_objects[0]
        for a in dir(actor):
            self.assertTrue(hasattr(actor, a))
            self.assertTrue(hasattr(actor, a.lower()))
            self.assertTrue(hasattr(actor, a.upper()))
Пример #9
0
    def test_insensitive_attributes(self):
        """If selected, it should be possible to access the attributes in a case insensitive manner"""

        api = TVDB("B43FF87DE395DF56", actors=True, ignore_case=True)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        actor = show.actor_objects[0]
        for a in dir(actor):
            self.assertTrue(hasattr(actor, a))
            self.assertTrue(hasattr(actor, a.lower()))
            self.assertTrue(hasattr(actor, a.upper()))
 def setUp(self):
     api = TVDB("B43FF87DE395DF56", actors=True)
     self.show = api.get_series(79349, "en")  # Load the series Dexter
     self.show.update()
Пример #11
0
 def setUp(self):
     api = TVDB("B43FF87DE395DF56", actors=True)
     self.show = api.get_series(79349, "en")  # Load the series Dexter
     self.show.update()
    def _getShow(self, _banners=True):
        api = TVDB("B43FF87DE395DF56", banners=_banners)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        return show
Пример #13
0
    def _getShow(self, _banners=True):
        api = TVDB("B43FF87DE395DF56", banners=_banners)
        show = api.get_series(79349, "en")  # Load the series Dexter
        show.update()

        return show