#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . cinder : ( 'volume_backup_get' , 'volume_get' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_volume_backup_detail_get( self ) : #NEWLINE# #INDENT# backup = self . cinder_volume_backups . first ( ) #NEWLINE# volume = self . cinder_volumes . get ( id = backup . volume_id ) #NEWLINE# api . cinder . volume_backup_get ( IsA ( http . HttpRequest ) , backup . id ) . AndReturn ( backup ) #NEWLINE# api . cinder . volume_get ( IsA ( http . HttpRequest ) , backup . volume_id ) . AndReturn ( volume ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# url = reverse ( 'horizon:project:volumes:backups:detail' , args = [ backup . id ] ) #NEWLINE# res = self . client . get ( url ) #NEWLINE# self . assertContains ( res , ( '<h1>Volume Backup Details: %s</h1>' % backup . name ) , 1 , 200 ) #NEWLINE# self . assertContains ( res , ( '<dd>%s</dd>' % backup . name ) , 1 , 200 ) #NEWLINE# self . assertContains ( res , ( '<dd>%s</dd>' % backup . id ) , 1 , 200 ) #NEWLINE# self . assertContains ( res , '<dd>Available</dd>' , 1 , 200 ) #NEWLINE# self . assertContains ( res , '<dt>Volume</dt>' , 1 , 200 )