#NEWLINE# def test__get_boot_device( self , mock_get_drac_client ) : #NEWLINE# #INDENT# mock_client = mock . Mock ( ) #NEWLINE# mock_get_drac_client . return_value = mock_client #NEWLINE# mock_client . list_boot_modes . return_value = [ mock . Mock ( ** self . boot_mode_ipl ) , mock . Mock ( ** self . boot_mode_one_time ) ] #NEWLINE# mock_client . list_boot_devices . return_value = { #NEWLINE# #INDENT# 'IPL' : [ mock . Mock ( ** self . boot_device_pxe ) , mock . Mock ( ** self . boot_device_disk ) ] , #NEWLINE# #UNINDENT# } #NEWLINE# boot_device = drac_mgmt . _get_boot_device ( self . node ) #NEWLINE# expected_boot_device = { #NEWLINE# #INDENT# 'boot_device' : 'pxe' , #NEWLINE# 'persistent' : True , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( expected_boot_device , boot_device ) #NEWLINE# mock_client . list_boot_modes . assert_called_once_with ( ) #NEWLINE# mock_client . list_boot_devices . assert_called_once_with ( )