<commit_before>module Crucible
  module Tests
    class BaseTest

      include Crucible::Tests::Assertions

      BASE_SPEC_LINK = 'http://hl7.org/fhir/DSTU2'
      REST_SPEC_LINK = "#{BASE_SPEC_LINK}/http.html"

      attr_accessor :tests_subset
      attr_accessor :tags

      # Base test fields, used in Crucible::Tests::Executor.list_all
      JSON_FIELDS = ['author','description','id','tests','title', 'multiserver', 'tags', 'details']
      STATUS = {
        pass: 'pass',
        fail: 'fail',
        error: 'error',
        skip: 'skip'
      }
      METADATA_FIELDS = ['links', 'requires', 'validates']

      def initialize(client, client2=nil)
        @client = client
        @client2 = client2
        @client.monitor_requests if @client
        @client2.monitor_requests if @client2
        @tags ||= []
      end

      def multiserver
        false
      end

      def execute
        @client.use_format_param = false if @client
        @client2.use_format_param = false if @client2
        {id => execute_test_methods}
      end

      def execute_test_methods
        result = []
        begin<commit_msg>added requires_authorization field on test that defaults to true<commit_after>module Crucible
  module Tests
    class BaseTest

      include Crucible::Tests::Assertions

      BASE_SPEC_LINK = 'http://hl7.org/fhir/DSTU2'
      REST_SPEC_LINK = "#{BASE_SPEC_LINK}/http.html"

      attr_accessor :tests_subset
      attr_accessor :tags

      # Base test fields, used in Crucible::Tests::Executor.list_all
      JSON_FIELDS = ['author','description','id','tests','title', 'multiserver', 'tags', 'details']
      STATUS = {
        pass: 'pass',
        fail: 'fail',
        error: 'error',
        skip: 'skip'
      }
      METADATA_FIELDS = ['links', 'requires', 'validates']

      def initialize(client, client2=nil)
        @client = client
        @client2 = client2
        @client.monitor_requests if @client
        @client2.monitor_requests if @client2
        @tags ||= []
      end

      def multiserver
        false
      end

      def execute
        @client.use_format_param = false if @client
        @client2.use_format_param = false if @client2
        {id => execute_test_methods}
      end

      def requires_authorization
        true
      end

      def execute_test_methods
        result = []
        begin
{'fraction_non_alphanumeric': 0.10397295012679628, 'fraction_numerical': 0.0076077768385460695, 'mean_word_length': 2.3151260504201683, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '623351', 'n_tokens_mistral': 734, 'n_tokens_neox': 694, 'n_words': 163}