#NEWLINE# @ mock . patch . object ( client . Client , 'create_port' ) #NEWLINE# def test_create_cleaning_ports_bad_config( self , create_mock ) : #NEWLINE# #INDENT# self . config ( cleaning_network_uuid = None , group = 'neutron' ) #NEWLINE# api = dhcp_factory . DHCPFactory ( ) . provider #NEWLINE# with task_manager . acquire ( self . context , self . node . uuid ) as task : #NEWLINE# #INDENT# self . assertRaises ( exception . InvalidParameterValue , api . create_cleaning_ports , create_mock )