Exemplo n.º 1
0
 def test_getPosters_When_program_is_not_movie_Then_returns_empty_list(
         self):
     program = TVProgram({
         'title': 'Seinfeld',
         'category_type': 'series'
     },
                         translator=Mock())
     provider = ImdbFanartProvider()
     self.assertListEqual([], provider.getPosters(program))
Exemplo n.º 2
0
 def test_getPosters_When_program_is_a_movie_Then_returns_fanart(self):
     # Setup
     program = TVProgram({'title':'Fargo', 'category_type':'movie'}, translator=Mock())
     provider = ImdbFanartProvider(nextProvider=None)
     
     # Test
     posters = provider.getPosters(program)
     
     # Verify
     log.debug('Poster URLs = %s' % posters)
     for p in posters:
         self.assertEqual('http', p[0:4])
Exemplo n.º 3
0
 def test_getPosters_When_program_is_a_movie_Then_returns_fanart(self):
     # Setup
     program = TVProgram({'title':'Fargo', 'category_type':'movie'}, translator=Mock())
     provider = ImdbFanartProvider()
     
     # Test
     posters = provider.getPosters(program)
     
     # Verify
     log.debug('Poster URLs = %s' % posters)
     for p in posters:
         self.assertEqual('http', p[0:4])
Exemplo n.º 4
0
 def test_getPosters_When_program_is_not_movie_Then_returns_empty_list(self):
     program = TVProgram({'title':'Seinfeld', 'category_type':'series'}, translator=Mock())
     provider = ImdbFanartProvider(nextProvider=None)
     self.assertListEqual([], provider.getPosters(program))