Skip to content

Instantly share code, notes, and snippets.

@james-prickett
Created March 6, 2011 18:22
Show Gist options
  • Select an option

  • Save james-prickett/857488 to your computer and use it in GitHub Desktop.

Select an option

Save james-prickett/857488 to your computer and use it in GitHub Desktop.
A simple unit test for the imdb scrapper
class ImdbServiceTests(unittest.TestCase):
def testGetIdsByPage(self):
service = ImdbService()
movie_ids = service.get_ids_from_page("http://www.imdb.com/chart/top")
self.assertNotEquals(None, movie_ids)
self.assertEquals(250, len(movie_ids))
for id in movie_ids:
self.assertNotEquals(None, id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment