#NEWLINE# def test_run_sqlalchmey_operational_failure( self ) : #NEWLINE# #INDENT# class SQLAlchemyCommands ( object ) : #NEWLINE# #INDENT# def operational_failure( self ) : #NEWLINE# #INDENT# raise sqlalchemy . exc . OperationalError ( "Can't open DB file" ) #NEWLINE# #UNINDENT# #UNINDENT# ret = cliutils . run ( [ 'rally' , 'failure' , 'operational_failure' ] , { #NEWLINE# #INDENT# 'failure' : SQLAlchemyCommands , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 1 , ret )