<commit_before>require_relative "../../test_helper"

module SmartAnswer::Calculators
  class PassportAndEmbassyDataQueryTest < ActiveSupport::TestCase

  	context PassportAndEmbassyDataQuery do

      setup do
        @query = PassportAndEmbassyDataQuery.new
      end
    
      context "find_passport_data" do
        should "find passport data by country slug" do
          assert_equal 'afghanistan', @query.find_passport_data('afghanistan')['type']
          assert_equal 'ips_documents_group_3', @query.find_passport_data('afghanistan')['group']
          assert_equal 'afghanistan', @query.find_passport_data('afghanistan')['helpline']
        end
      end

      context "retain_passport?" do
        should "indicate whether to retain your passport when applying from the given country" do
          assert @query.retain_passport?('afghanistan')
          refute @query.retain_passport?('france')
        end
      end

      context "passport_costs" do
        should "format passport costs" do
          %w(south_african_rand_adult_32 south_african_rand_adult_48 south_african_rand_child
            euros_adult_32 euros_adult_48 euros_child).each do |k|
            assert @query.passport_costs.has_key?(k), "passport_costs should have key #{k}"
          end
          assert_match /^\d,\d\d\d South African Rand/, @query.passport_costs["south_african_rand_adult_48"] 
        end
      end
      
    end
  end
end<commit_msg>Whitespace<commit_after>require_relative "../../test_helper"

module SmartAnswer::Calculators
  class PassportAndEmbassyDataQueryTest < ActiveSupport::TestCase

  	context PassportAndEmbassyDataQuery do

      setup do
        @query = PassportAndEmbassyDataQuery.new
      end

      context "find_passport_data" do
        should "find passport data by country slug" do
          assert_equal 'afghanistan', @query.find_passport_data('afghanistan')['type']
          assert_equal 'ips_documents_group_3', @query.find_passport_data('afghanistan')['group']
          assert_equal 'afghanistan', @query.find_passport_data('afghanistan')['helpline']
        end
      end

      context "retain_passport?" do
        should "indicate whether to retain your passport when applying from the given country" do
          assert @query.retain_passport?('afghanistan')
          refute @query.retain_passport?('france')
        end
      end

      context "passport_costs" do
        should "format passport costs" do
          %w(south_african_rand_adult_32 south_african_rand_adult_48 south_african_rand_child
            euros_adult_32 euros_adult_48 euros_child).each do |k|
            assert @query.passport_costs.has_key?(k), "passport_costs should have key #{k}"
          end
          assert_match /^\d,\d\d\d South African Rand/, @query.passport_costs["south_african_rand_adult_48"]
        end
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.08228730822873083, 'fraction_numerical': 0.007670850767085077, 'mean_word_length': 3.0985714285714288, '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': '3954807', 'n_tokens_mistral': 908, 'n_tokens_neox': 854, 'n_words': 189}