def test_getPosters_When_title_has_funny_chars_Then_dont_fail_miserably(self): # Setup program = TVProgram({'title': u'Königreich der Himmel', 'category_type':'series'}, translator=Mock()) provider = GoogleImageSearchProvider(nextProvider=None) # Test posters = provider.getPosters(program) # Verify log.debug('Posters = %s' % posters) self.assertTrue(len(posters) > 0) for p in posters: self.assertEqual('http', p[0:4])
def test_getPosters_works(self): # Setup program = TVProgram({'title': 'Top Chef', 'category_type':'series'}, translator=Mock()) provider = GoogleImageSearchProvider(nextProvider=None) # Test posters = provider.getPosters(program) # Verify log.debug('Posters = %s' % posters) self.assertTrue(len(posters) > 0) for p in posters: self.assertEqual('http', p[0:4])
def test_getPosters_When_title_has_funny_chars_Then_dont_fail_miserably(self): # Setup program = TVProgram({'title': u'Königreich der Himmel', 'category_type':'series'}, translator=Mock()) provider = GoogleImageSearchProvider() # Test posters = provider.getPosters(program) # Verify log.debug('Posters = %s' % posters) self.assertTrue(len(posters) > 0) for p in posters: self.assertEqual('http', p[0:4])
def test_getPosters_works(self): # Setup program = TVProgram({'title': 'Top Chef', 'category_type':'series'}, translator=Mock()) provider = GoogleImageSearchProvider() # Test posters = provider.getPosters(program) # Verify log.debug('Posters = %s' % posters) self.assertTrue(len(posters) > 0) for p in posters: self.assertEqual('http', p[0:4])
def getProvider(self): return GoogleImageSearchProvider()
def getProvider(self): return GoogleImageSearchProvider(nextProvider=None)