#NEWLINE# def test_Permission_provide_exception( app , member , ismember ) : #NEWLINE# #INDENT# Allows ( app = app ) #NEWLINE# class MyForbid ( Forbidden ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# with app . app_context ( ) : #NEWLINE# #INDENT# p = Permission ( member , throws = MyForbid ( 'Nope' ) ) #NEWLINE# #UNINDENT# assert ( isinstance ( p . throws , MyForbid ) and ( p . throws . description == 'Nope' ) )