#NEWLINE# @ mock . patch . object ( connection , 'post' ) #NEWLINE# @ mock . patch . object ( activity , 'wait4task' ) #NEWLINE# def test_create_server_profile_template_with_connections( self , mock_wait4task , mock_post ) : #NEWLINE# #INDENT# name = 'spt' #NEWLINE# description = 'description' #NEWLINE# sht = '/rest/server-hardware-types/1234' #NEWLINE# eg = '/rest/enclosure-groups/1' #NEWLINE# affinity = 'Bay' #NEWLINE# hide_flex = True #NEWLINE# fw_settings = make_FirmwareSettingsV3 ( '/rest/firmware-drivers/SPP2016020_2015' , 'FirmwareOnly' , True , False ) #NEWLINE# connections = make_ProfileConnectionV4 ( 1 , 'eth1' , '/rest/ethernet-networks/17f5e012' , True , None , 'Ethernet' , None , None , 'Auto' , '1000' , None , None , None ) #NEWLINE# spt = make_ServerProfileTemplateV1 ( name , description , None , sht , eg , affinity , hide_flex , connections , fw_settings ) #NEWLINE# task = self . build_spt_add_task_resource ( ) #NEWLINE# mock_post . return_value = [ task , None ] #NEWLINE# self . servers . create_server_profile_template ( name , description , None , sht , eg , affinity , hide_flex , connections , fw_settings ) #NEWLINE# mock_post . assert_called_once_with ( uri [ 'profile-templates' ] , spt )