#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . trove : ( 'instance_list' , 'flavor_list' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_index_flavor_list_exception( self ) : #NEWLINE# #INDENT# databases = common . Paginated ( self . databases . list ( ) ) #NEWLINE# api . trove . instance_list ( IsA ( http . HttpRequest ) , marker = None ) . AndReturn ( self ) #NEWLINE# api . trove . flavor_list ( IsA ( http . HttpRequest ) ) . AndRaise ( self . exceptions . trove ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# res = self . client . get ( INDEX_URL ) #NEWLINE# self . assertTemplateUsed ( res , 'project/databases/index.html' ) #NEWLINE# self . assertMessageCount ( res , error = 1 )