#NEWLINE# def testUpdateConfig( self ) : #NEWLINE# #INDENT# 'Ensure we can retrieve and update the config.' #NEWLINE# client_mock = action_mocks . ActionMock ( 'GetConfiguration' , 'UpdateConfiguration' ) #NEWLINE# loc = 'http://www.example.com' #NEWLINE# new_config = rdf_protodict . Dict ( { #NEWLINE# #INDENT# 'Client.server_urls' : [ loc ] , #NEWLINE# 'Client.foreman_check_frequency' : 3600 , #NEWLINE# 'Client.poll_min' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# with utils . Stubber ( config_lib . CONFIG , 'Set' , config_lib . CONFIG . Set . old_target ) : #NEWLINE# #INDENT# for _ in test_lib . TestFlowHelper ( 'UpdateConfiguration' , client_mock , client_id = self . client_id , token = self . token , config = new_config ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# for _ in test_lib . TestFlowHelper ( 'Interrogate' , new_config , token = self . token , client_id = self . client_id ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# fd = aff4 . FACTORY . Open ( self . client_id , token = self . token ) #NEWLINE# config_dat = fd . Get ( fd . Schema . GRR_CONFIGURATION ) #NEWLINE# self . assertEqual ( config_dat [ 'Client.server_urls' ] , [ loc ] ) #NEWLINE# self . assertEqual ( config_dat [ 'Client.poll_min' ] , 1 )