#NEWLINE# @ mock . patch . object ( partitioning , 'os' , autospec = True ) #NEWLINE# @ mock . patch . object ( partitioning , 'utils' , autospec = True ) #NEWLINE# @ mock . patch . object ( partitioning , 'mu' , autospec = True ) #NEWLINE# @ mock . patch . object ( partitioning , 'lu' , autospec = True ) #NEWLINE# @ mock . patch . object ( partitioning , 'fu' , autospec = True ) #NEWLINE# @ mock . patch . object ( partitioning , 'pu' , autospec = True ) #NEWLINE# def test_do_partitioning_md( self , mock_pu , mock_fu , mock_lu , mock_mu , mock_utils , mock_os ) : #NEWLINE# #INDENT# mock_os . path . exists . return_value = True #NEWLINE# self . drv . partition_scheme . mds = [ objects . MD ( 'fake_md1' , 'mirror' , devices = [ '/dev/sda1' , '/dev/sdb1' ] ) , objects . MD ( 'fake_md2' , 'mirror' , devices = [ '/dev/sdb3' , '/dev/sdc1' ] ) ] #NEWLINE# self . action . execute ( ) #NEWLINE# self . assertEqual ( [ mock . call ( 'fake_md1' , 'mirror' , [ '/dev/sda1' , '/dev/sdb1' ] , 'default' ) , mock . call ( 'fake_md2' , 'mirror' , [ '/dev/sdb3' , '/dev/sdc1' ] , 'default' ) ] , mock_mu . mdcreate . call_args_list )