Fix tests for Python3

Looks like Exception.message is invalid in python3, you can use
str(Exception) instead or whatever other methods to get the exception
message is available. For the Werkzeug exceptions, this is
get_description() it seems.