Skip to content

Commit

Permalink
[movie] Add unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ari-koivula committed Mar 16, 2014
1 parent c74e419 commit a544c23
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@


@willie.module.commands('movie', 'imdb')
@willie.module.example('.movie Movie Title')
@willie.module.example('.movie ThisTitleDoesNotExist', '[MOVIE] Movie not found!')
@willie.module.example('.movie Citizen Kane', '[MOVIE] Title: Citizen Kane | Year: 1941 | Rating: 8.5 | Genre: Drama, Mystery | IMDB Link: http://imdb.com/title/tt0033467')
def movie(bot, trigger):
"""
Returns some information about a movie, like Title, Year, Rating, Genre and IMDB Link.
Expand All @@ -37,3 +38,8 @@ def movie(bot, trigger):
' | Genre: ' + data['Genre'] + \
' | IMDB Link: http://imdb.com/title/' + data['imdbID']
bot.say(message)


if __name__ == "__main__":
from willie.test_tools import run_example_tests
run_example_tests(__file__)

0 comments on commit a544c23

Please sign in to comment.