#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'network_list' , ) , #NEWLINE# quotas : ( 'tenant_quota_usages' , ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_subnet_create_button_disabled_when_quota_exceeded_index( self ) : #NEWLINE# #INDENT# network_id = self . networks . first ( ) . id #NEWLINE# create_link = networks_tables . CreateSubnet ( ) #NEWLINE# url = reverse ( create_link . get_link_url ( ) , args = [ network_id ] ) #NEWLINE# classes = ( list ( create_link . get_default_classes ( ) ) + list ( create_link . classes ) ) #NEWLINE# link_name = ( '%s (%s)' % ( unicode ( create_link . verbose_name ) , 'Quota exceeded' ) ) #NEWLINE# expected_string = ( "<a href='%s' class='%s disabled' id='networks__row_%s__action_subnet'>%s</a>" % ( url , ' ' . join ( classes ) , network_id , link_name ) ) #NEWLINE# self . _test_create_button_disabled_when_quota_exceeded ( expected_string , subnet_quota = 0 )