Skip to content

Commit

Permalink
Added test_episode_proxy() to [tests/test_summary.py]
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzeman committed Mar 31, 2015
1 parent cd7dfdc commit 1ab4cd3
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion tests/test_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def test_season():


@responses.activate
def test_episode():
def test_episode_basic():
responses.add(
responses.GET, 'http://mock/shows/game-of-thrones/seasons/1/episodes/1',
body=read('fixtures/shows/game-of-thrones/seasons/1/episodes/1.json'), status=200,
Expand All @@ -144,3 +144,27 @@ def test_episode():
('tvrage', '1065008299'),
('trakt', '73640')
]


@responses.activate
def test_episode_proxy():
responses.add(
responses.GET, 'http://mock/shows/game-of-thrones/seasons/1/episodes/1',
body=read('fixtures/shows/game-of-thrones/seasons/1/episodes/1.json'), status=200,
content_type='application/json'
)

Trakt.base_url = 'http://mock'

episode = Trakt['shows/game-of-thrones'].episode(1, 1)

assert episode.title == 'Winter Is Coming'
assert episode.pk == (1, 1)
assert episode.keys == [
(1, 1),
('tvdb', '3254641'),
('tmdb', '63056'),
('imdb', 'tt1480055'),
('tvrage', '1065008299'),
('trakt', '73640')
]

0 comments on commit 1ab4cd3

Please sign in to comment.