#NEWLINE# def test_validation_passed( self ) : #NEWLINE# #INDENT# self . ng . nodegroup . cluster_id = ( - 1 ) #NEWLINE# with mock . patch ( 'nailgun.extensions.network_manager.validators.ip_addr.objects.IPAddrCollection.get_all_by_addr' , new = mock . Mock ( return_value = mock . Mock ( first = mock . Mock ( return_value = None ) ) ) ) : #NEWLINE# #INDENT# data = ip_addr . IPAddrValidator . validate_create ( self . create_data , self . cluster ) #NEWLINE# self . assertEqual ( self . create_data , data )