<commit_before>require "test_helper"
require "elasticsearch_wrapper"
require "webmock"

class ElasticsearchWrapperAdvancedSearchTest < Test::Unit::TestCase
  include Fixtures::DefaultMappings

  def setup
    @settings = {
      server: "example.com",
      port: 9200,
      index_name: "test-index"
    }
    @wrapper = ElasticsearchWrapper.new(@settings, default_mappings)
  end

  def test_pagination_params_are_required
    stub_empty_search

    assert_rejected_search('Pagination params are required.', {})<commit_msg>Use double quotes where possible<commit_after>require "test_helper"
require "elasticsearch_wrapper"
require "webmock"

class ElasticsearchWrapperAdvancedSearchTest < Test::Unit::TestCase
  include Fixtures::DefaultMappings

  def setup
    @settings = {
      server: "example.com",
      port: 9200,
      index_name: "test-index"
    }
    @wrapper = ElasticsearchWrapper.new(@settings, default_mappings)
  end

  def test_pagination_params_are_required
    stub_empty_search

    assert_rejected_search("Pagination params are required.", {})
{'fraction_non_alphanumeric': 0.08606173994387278, 'fraction_numerical': 0.007483629560336763, 'mean_word_length': 4.783783783783784, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1083612', 'n_tokens_mistral': 315, 'n_tokens_neox': 314, 'n_words': 66}