#NEWLINE# def test_rebalance_remove_zero_weighted_device( self ) : #NEWLINE# #INDENT# self . create_sample_ring ( ) #NEWLINE# ring = RingBuilder . load ( self . tmpfile ) #NEWLINE# ring . set_dev_weight ( 3 , 0.0 ) #NEWLINE# ring . rebalance ( ) #NEWLINE# ring . pretend_min_part_hours_passed ( ) #NEWLINE# ring . remove_dev ( 3 ) #NEWLINE# ring . save ( self . tmpfile ) #NEWLINE# argv = [ '' , self . tmpfile , 'rebalance' , '3' ] #NEWLINE# self . assertSystemExit ( EXIT_SUCCESS , ringbuilder . main , argv ) #NEWLINE# ring = RingBuilder . load ( self . tmpfile ) #NEWLINE# self . assertTrue ( ring . validate ( ) ) #NEWLINE# self . assertEqual ( ring . devs [ 3 ] , None )