def testWImdbId(self): """Should find correct movie if passing imdb id""" movie = odentify.fetch_movie('tt0816692') self.assertEqual('Interstellar', movie['Title'])
def testNonExistentMovieName(self): """Should return null if movie is not found by name""" movie = odentify.fetch_movie('This is not a real movie name doofus') self.assertIsNone(movie)
def testMovieWSpecialChars(self): movie = odentify.fetch_movie('Cannibal! The Musical') self.assertEqual('tt0115819', movie['imdbID'])
def testWinvalidImdbId(self): """Should return null if movie is not found by imdb id""" movie = odentify.fetch_movie('tt0000000') self.assertIsNone(movie)
def testWMovieName(self): """Should find correct movie with title""" movie = odentify.fetch_movie('Interstellar') self.assertEqual('tt0816692', movie['imdbID'])