Add tests for show.watched_progress, show.collection_progress
ADD
tests/test_trakt_progress.py
+#!/usr/bin/env python3 -m pytest
+from trakt.tv import TVShow
+
+from plextraktsync.pytrakt_extensions import ShowProgress
+from plextraktsync.trakt_api import TraktApi
+from tests.conftest import factory
+
+trakt: TraktApi = factory.trakt_api()
+
+
+def test_trakt_collection_progress():
+ show = TVShow('Game of Thrones')
+ collected = trakt.collected(show)
+ assert isinstance(collected, ShowProgress)
+ s01e01 = collected.get_completed(1, 1)
+ assert isinstance(s01e01, bool)
+
+
+def test_trakt_watched_progress():
+ show = TVShow('Game of Thrones')
+ data = show.watched_progress()
+ watched = ShowProgress(**data)
+
+ assert isinstance(watched, ShowProgress)
+ s01e01 = watched.get_completed(1, 1)
+ assert isinstance(s01e01, bool)
+
+
+if __name__ == '__main__':
+ test_trakt_collection_progress()
+ test_trakt_watched_progress()

Add tests for show.watched_progress, show.collection_progress