#NEWLINE# def test_not_defined_security_scheme( self ) : #NEWLINE# #INDENT# from ramses import auth #NEWLINE# scheme = Mock ( ) #NEWLINE# scheme . name = 'foo' #NEWLINE# raml_data = Mock ( secured_by = [ 'zoo' ] , security_schemes = [ raml_data ] ) #NEWLINE# with pytest . raises ( ValueError ) as ex : #NEWLINE# #INDENT# auth . setup_auth_policies ( 'asd' , raml_data ) #NEWLINE# #UNINDENT# expected = 'Undefined security scheme used in `secured_by`: zoo' #NEWLINE# assert ( expected == str ( ex . value ) )