Solutions will be available when this assignment is resolved, or after a few failing attempts.
Get Movies and Directors
Search the 'marvel' movie table in the database and return the title and director from each movie. Only get as many movies as the limit parameter.
get_movies_and_directors(db, limit=3) ''' [('Iron Man', 'Jon Favreau'), ('The Incredible Hulk', 'Louis Leterrier'), ('Iron Man 2', 'Jon Favreau') ] '''
test movies and directors - Run Test
def test_movies_and_directors(): result = get_movies_and_directors(db, limit=3) assert len(result) == 3 assert result == ('Iron Man', 'Jon Favreau') assert result == ('Iron Man 2', 'Jon Favreau')