#NEWLINE# @ mock . patch . object ( ribcl , 'RIBCLOperations' ) #NEWLINE# @ mock . patch . object ( ris , 'RISOperations' ) #NEWLINE# def test_init( self , ris_mock , ribcl_mock ) : #NEWLINE# #INDENT# ribcl_obj_mock = mock . MagicMock ( ) #NEWLINE# ribcl_mock . return_value = ris_mock #NEWLINE# ribcl_obj_mock . get_product_name . return_value = 'product' #NEWLINE# c = client . IloClient ( '1.2.3.4' , 'admin' , 'Admin' , timeout = 120 , port = 4430 , bios_password = 'foo' , cacert = '/somewhere' ) #NEWLINE# ris_mock . assert_called_once_with ( '1.2.3.4' , 'admin' , 'Admin' , bios_password = 'foo' , cacert = '/somewhere' ) #NEWLINE# ribcl_mock . assert_called_once_with ( '1.2.3.4' , 'admin' , 'Admin' , 120 , 4430 , cacert = '/somewhere' ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# 'address' : '1.2.3.4' , #NEWLINE# 'username' : 'admin' , #NEWLINE# 'password' : 'Admin' , #NEWLINE# #UNINDENT# } , c . info ) #NEWLINE# self . assertEqual ( 'product' , c . model )