original_docstring: Provide context on why this specific record failed.
  
          Args:
              base_message (str): Base error message to be reported with extra context
              log_type (str): Type of log being tested
              schema_keys (set): A collection of the keys from the schema
              test_record (dict): Actual record being tested - this could be one of
                  many records extracted using jsonpath_rw
          
docstring: Provide context on why this specific record failed.
docstring_tokens: Provide context on why this specific record failed .
code: def report_record_delta(self, base_message, log_type, schema_keys, test_record):
          """Provide context on why this specific record failed.
  
          Args:
              base_message (str): Base error message to be reported with extra context
              log_type (str): Type of log being tested
              schema_keys (set): A collection of the keys from the schema
              test_record (dict): Actual record being tested - this could be one of
                  many records extracted using jsonpath_rw
          """
          optional_keys = set(
              self.cli_config['logs'] \
                  [log_type].get('configuration', {}).get('optional_top_level_keys', {})
          )
  
          min_req_record_schema_keys = set(schema_keys).difference(optional_keys)
  
          test_record_keys = set(test_record)
  
          schema_diff = min_req_record_schema_keys.difference(test_record_keys)
          if schema_diff:
              missing_key_list = ', '.join('\'{}\''.format(key) for key in schema_diff)
              message = ('{} Data is invalid due to missing key(s) in test record: '
                         '{}.'.format(base_message, missing_key_list))
  
              self.status_messages.append(StatusMessage(StatusMessage.FAILURE, message))
              return
  
          unexpected_keys = test_record_keys.difference(schema_keys)
          if unexpected_keys:
              unexpected_key_list = ', '.join('\'{}\''.format(key) for key in unexpected_keys)
              message = ('{} Data is invalid due to unexpected key(s) in test record: '
                         '{}.'.format(base_message, unexpected_key_list))
  
              self.status_messages.append(StatusMessage(StatusMessage.FAILURE, message))
              return
  
          # Add a generic error message if we can not determine what the issue is
          message = '{} Please look for any errors above.'.format(base_message)
          self.status_messages.append(StatusMessage(StatusMessage.FAILURE, message))
code_tokens: def report_record_delta ( self , base_message , log_type , schema_keys , test_record ) : optional_keys = set ( self . cli_config [ 'logs' ] [ log_type ] . get ( 'configuration' , { } ) . get ( 'optional_top_level_keys' , { } ) ) min_req_record_schema_keys = set ( schema_keys ) . difference ( optional_keys ) test_record_keys = set ( test_record ) schema_diff = min_req_record_schema_keys . difference ( test_record_keys ) if schema_diff : missing_key_list = ', ' . join ( '\'{}\'' . format ( key ) for key in schema_diff ) message = ( '{} Data is invalid due to missing key(s) in test record: ' '{}.' . format ( base_message , missing_key_list ) ) self . status_messages . append ( StatusMessage ( StatusMessage . FAILURE , message ) ) return unexpected_keys = test_record_keys . difference ( schema_keys ) if unexpected_keys : unexpected_key_list = ', ' . join ( '\'{}\'' . format ( key ) for key in unexpected_keys ) message = ( '{} Data is invalid due to unexpected key(s) in test record: ' '{}.' . format ( base_message , unexpected_key_list ) ) self . status_messages . append ( StatusMessage ( StatusMessage . FAILURE , message ) ) return message = '{} Please look for any errors above.' . format ( base_message ) self . status_messages . append ( StatusMessage ( StatusMessage . FAILURE , message ) )
short_docstring: Provide context on why this specific record failed.
short_docstring_tokens: Provide context on why this specific record failed .
comment: """Provide context on why this specific record failed.
  
          Args:
              base_message (str): Base error message to be reported with extra context
              log_type (str): Type of log being tested
              schema_keys (set): A collection of the keys from the schema
              test_record (dict): Actual record being tested - this could be one of
                  many records extracted using jsonpath_rw
          """$SEP$# Add a generic error message if we can not determine what the issue is