diff --git a/tests/test_shows.py b/tests/test_shows.py index 2ec2407..7c12385 100644 --- a/tests/test_shows.py +++ b/tests/test_shows.py @@ -67,6 +67,14 @@ def test_get_people(): for group in groups: assert all([isinstance(p, Person) for p in group]) + ids = { + 'imdb': 'nm0227759', + 'slug': 'peter-dinklage', + 'tmdb': 22970, + 'trakt': 639, + } + assert got.people[0].ids['ids'] == ids + def test_ratings(): got = TVShow('Game of Thrones') diff --git a/trakt/mixins.py b/trakt/mixins.py index 7812f86..4b39195 100644 --- a/trakt/mixins.py +++ b/trakt/mixins.py @@ -28,6 +28,10 @@ def ids(self): 'ids': ids } + @ids.setter + def ids(self, value): + self._ids = value + @property def imdb(self): return self._ids.get('imdb', None)