From eda137a7a4257348fe6fc306d5f9951bd5708e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 11 Dec 2022 19:05:13 +0200 Subject: [PATCH 1/2] Add test for People.ids --- tests/test_shows.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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') From c99f38fcca728c13613719aed2328163f8928c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 11 Dec 2022 19:05:37 +0200 Subject: [PATCH 2/2] Add ids setter --- trakt/mixins.py | 4 ++++ 1 file changed, 4 insertions(+) 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)