<commit_before>module NamedMapsHelper
  def bypass_named_maps
    mocked_response = mock
    mocked_response.stubs(code: 200, response_body: '{}')

    mocked_http_client = Carto::Http::Client.get('named_maps')
    mocked_http_client.stubs(:perform_request).returns(mocked_response)

    Carto::NamedMaps::Api.any_instance.stubs(http_client: mocked_http_client, show: nil)
  end
end<commit_msg>Add a different named maps helper instead<commit_after>module NamedMapsHelper
  def bypass_named_maps
    Carto::NamedMaps::Api.any_instance.stubs(show: nil, create: true, update: true, destroy: true)
  end

  def bypass_named_maps_requests
    mocked_response = mock
    mocked_response.stubs(code: 200, response_body: '{}')

    mocked_http_client = Carto::Http::Client.get('named_maps')
    mocked_http_client.stubs(:perform_request).returns(mocked_response)

    Carto::NamedMaps::Api.any_instance.stubs(http_client: mocked_http_client, show: nil)
  end
end
{'fraction_non_alphanumeric': 0.10366492146596859, 'fraction_numerical': 0.0062827225130890054, 'mean_word_length': 6.18796992481203, 'pattern_counts': {'":': 0, '<': 3, '<?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': '649010', 'n_tokens_mistral': 336, 'n_tokens_neox': 321, 'n_words': 52}