Skip to content

Commit

Permalink
Renamed the watched_progress and collection_progress methods to `…
Browse files Browse the repository at this point in the history
…progress_watched` and `progress_collection`

#60
  • Loading branch information
fuzeman committed Oct 5, 2018
1 parent a8e751b commit d2ada3a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions tests/test_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from httmock import HTTMock


def test_watched_progress():
def test_progress_watched():
with HTTMock(mock.fixtures, mock.unknown):
with Trakt.configuration.auth('mock', 'mock'):
progress = Trakt['shows'].watched_progress(1390)
progress = Trakt['shows'].progress_watched(1390)

assert progress is not None
assert progress.reset_at is not None
Expand All @@ -31,10 +31,10 @@ def test_watched_progress():
assert progress.last_episode.pk == (1, 5)


def test_watched_progress_plus_hidden():
def test_progress_watched_plus_hidden():
with HTTMock(mock.fixtures, mock.unknown):
with Trakt.configuration.auth('mock', 'mock'):
progress = Trakt['shows'].watched_progress('game-of-thrones', hidden=True)
progress = Trakt['shows'].progress_watched('game-of-thrones', hidden=True)

assert progress is not None
assert progress.reset_at is None
Expand Down Expand Up @@ -130,10 +130,10 @@ def test_watched_progress_plus_hidden():
}))


def test_collection_progress():
def test_progress_collection():
with HTTMock(mock.fixtures, mock.unknown):
with Trakt.configuration.auth('mock', 'mock'):
progress = Trakt['shows'].collection_progress(1390)
progress = Trakt['shows'].progress_collection(1390)

assert progress is not None
assert progress.reset_at is None
Expand Down
16 changes: 8 additions & 8 deletions trakt/interfaces/shows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@ def episode(self, id, season, episode, extended=None, **kwargs):

return SummaryMapper.episode(self.client, item)

@authenticated
def watched_progress(self, id, hidden=False, specials=False, count_specials=True, **kwargs):
return self.progress('watched', id, hidden, specials, count_specials, **kwargs)

@authenticated
def collection_progress(self, id, hidden=False, specials=False, count_specials=True, **kwargs):
return self.progress('collection', id, hidden, specials, count_specials, **kwargs)

@authenticated
def progress(self, progress_type, id, hidden=False, specials=False, count_specials=True, **kwargs):
query = {
Expand All @@ -132,3 +124,11 @@ def progress(self, progress_type, id, hidden=False, specials=False, count_specia
return item

return ProgressMapper.progress(self.client, progress_type, item)

@authenticated
def progress_collection(self, id, hidden=False, specials=False, count_specials=True, **kwargs):
return self.progress('collection', id, hidden, specials, count_specials, **kwargs)

@authenticated
def progress_watched(self, id, hidden=False, specials=False, count_specials=True, **kwargs):
return self.progress('watched', id, hidden, specials, count_specials, **kwargs)

0 comments on commit d2ada3a

Please sign in to comment.