Created
March 6, 2011 18:22
-
-
Save james-prickett/857488 to your computer and use it in GitHub Desktop.
A simple unit test for the imdb scrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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