#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . trove : ( 'flavor_list' , ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_launch_instance_exception_on_flavors( self ) : #NEWLINE# #INDENT# trove_exception = self . exceptions . nova #NEWLINE# api . trove . flavor_list ( IsA ( http . HttpRequest ) ) . AndRaise ( trove_exception ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# toSuppress = [ 'openstack_dashboard.dashboards.project.databases.workflows.create_instance' , 'horizon.workflows.base' ] #NEWLINE# loggers = [ ] #NEWLINE# for cls in toSuppress : #NEWLINE# #INDENT# logger = logging . getLogger ( cls ) #NEWLINE# loggers . append ( ( logger , logger . getEffectiveLevel ( ) ) ) #NEWLINE# logger . setLevel ( logging . CRITICAL ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# with self . assertRaises ( exceptions . Http302 ) : #NEWLINE# #INDENT# self . client . get ( LAUNCH_URL ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# for ( log , level ) in loggers : #NEWLINE# #INDENT# log . setLevel ( level )