original_docstring: Apply default values to the given test event
  
          Args:
              test_event (dict): The loaded test event
          
docstring: Apply default values to the given test event
docstring_tokens: Apply default values to the given test event
code: def apply_template(self, test_event):
          """Apply default values to the given test event
  
          Args:
              test_event (dict): The loaded test event
          """
          event_log = self.cli_config['logs'].get(test_event['log'])
  
          parser = event_log['parser']
          schema = event_log['schema']
          configuration = event_log.get('configuration', {})
  
          # Add envelope keys
          schema.update(configuration.get('envelope_keys', {}))
  
          # Setup the parser to access default optional values
          self.parsers[parser] = self.parsers.get(parser, get_parser(parser))
  
          # Add apply default values based on the declared schema
          default_test_event = {key: self.parsers[parser].default_optional_values(value)
                                for key, value
                                in schema.iteritems()}
  
          # Fill in the fields left out in the 'override_record' field,
          # and update the test event with a full 'data' key
          default_test_event.update(test_event['override_record'])
          test_event['data'] = default_test_event
code_tokens: def apply_template ( self , test_event ) : event_log = self . cli_config [ 'logs' ] . get ( test_event [ 'log' ] ) parser = event_log [ 'parser' ] schema = event_log [ 'schema' ] configuration = event_log . get ( 'configuration' , { } ) schema . update ( configuration . get ( 'envelope_keys' , { } ) ) self . parsers [ parser ] = self . parsers . get ( parser , get_parser ( parser ) ) default_test_event = { key : self . parsers [ parser ] . default_optional_values ( value ) for key , value in schema . iteritems ( ) } default_test_event . update ( test_event [ 'override_record' ] ) test_event [ 'data' ] = default_test_event
short_docstring: Apply default values to the given test event
short_docstring_tokens: Apply default values to the given test event
comment: """Apply default values to the given test event
  
          Args:
              test_event (dict): The loaded test event
          """$SEP$# Add envelope keys$SEP$# Setup the parser to access default optional values$SEP$# Add apply default values based on the declared schema$SEP$# Fill in the fields left out in the 'override_record' field,$SEP$# and update the test event with a full 'data' key