#NEWLINE# def test_forbidden_if_required_permission_missing( self ) : #NEWLINE# #INDENT# self . app . put_json ( ( '/models/%s' % self . model_id ) , { #NEWLINE# #INDENT# 'definition' : self . valid_definition , #NEWLINE# #UNINDENT# } , headers = self . headers ) #NEWLINE# self . app . patch_json ( ( '/models/%s/permissions' % self . model_id ) , { #NEWLINE# #INDENT# self . credentials [ 'id' ] : [ '-ALL' ] , #NEWLINE# #UNINDENT# } , headers = self . headers ) #NEWLINE# resp = self . app . get ( ( '/models/%s' % self . model_id ) , headers = self . headers , status = 403 ) #NEWLINE# self . assertIn ( '403' , resp )