use response.raise_for_status() instead of assert
use response.raise_for_status() instead of assert

requests has a built in method for handling http errors
http://docs.python-requests.org/en/latest/api/#requests.Response.raise_for_status
techartorg/slacker,hreeder/slacker,BetterWorks/slacker,os/slacker,kashyap32/slacker,STANAPO/slacker,wasabi0522/slacker,wkentaro/slacker