#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# cinder : ( 'volume_type_list_with_qos_associations' , 'qos_spec_list' , 'extension_supported' , 'volume_encryption_type_list' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_volume_types_tab( self ) : #NEWLINE# #INDENT# encryption_list = ( self . cinder_volume_encryption_types . list ( ) [ 0 ] , self . cinder_volume_encryption_types . list ( ) [ 1 ] ) #NEWLINE# cinder . volume_type_list_with_qos_associations ( IsA ( http . HttpRequest ) ) . AndReturn ( self . volume_types . list ( ) ) #NEWLINE# cinder . qos_spec_list ( IsA ( http . HttpRequest ) ) . AndReturn ( self . cinder_qos_specs . list ( ) ) #NEWLINE# cinder . volume_encryption_type_list ( IsA ( http . HttpRequest ) ) . AndReturn ( encryption_list ) #NEWLINE# cinder . extension_supported ( IsA ( http . HttpRequest ) , 'VolumeTypeEncryption' ) . MultipleTimes ( ) . AndReturn ( True ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# res = self . client . get ( reverse ( 'horizon:admin:volumes:volume_types_tab' ) ) #NEWLINE# self . assertEqual ( res . status_code , 200 ) #NEWLINE# self . assertTemplateUsed ( res , 'admin/volumes/volume_types/volume_types_tables.html' ) #NEWLINE# volume_types = qos_specs . context [ 'volume_types_table' ] . data #NEWLINE# self . assertItemsEqual ( volume_types , self . volume_types . list ( ) ) #NEWLINE# qos_specs = res . context [ 'qos_specs_table' ] . data #NEWLINE# self . assertItemsEqual ( qos_specs , self . cinder_qos_specs . list ( ) )