Пример #1
0
 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])
Пример #2
0
 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])
Пример #3
0
 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])
Пример #4
0
 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])
Пример #5
0
 def getProvider(self):
     return GoogleImageSearchProvider()
Пример #6
0
 def getProvider(self):
     return GoogleImageSearchProvider(nextProvider=None)