<commit_before>require_relative '../test_helper'

class ParsingTest < ActiveSupport::TestCase
  context "parser" do
    setup do
      stub_solr
      Snp.delete_all
      UserSnp.delete_all

      @file_23andMe = "#{Rails.root}/test/data/23andMe_test.csv"
      Sidekiq::Client.expects(:enqueue).with(Preparsing, instance_of(Fixnum))
      @genotype_23andme = FactoryGirl.create(:genotype,
        genotype_file_name: @file_23andMe.split('/').last, filetype: '23andme')

      @file_deCODEme = "#{Rails.root}/test/data/deCODEme_test.csv"<commit_msg>stubbing Sidekiq enqueue<commit_after>require_relative '../test_helper'

class ParsingTest < ActiveSupport::TestCase
  context "parser" do
    setup do
      stub_solr
      Snp.delete_all
      UserSnp.delete_all

      @file_23andMe = "#{Rails.root}/test/data/23andMe_test.csv"
      Sidekiq::Client.stubs(:enqueue).with(Preparsing, instance_of(Fixnum))
      @genotype_23andme = FactoryGirl.create(:genotype,
        genotype_file_name: @file_23andMe.split('/').last, filetype: '23andme')

      @file_deCODEme = "#{Rails.root}/test/data/deCODEme_test.csv"
{'fraction_non_alphanumeric': 0.12804328223624886, 'fraction_numerical': 0.018034265103697024, 'mean_word_length': 4.068493150684931, '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': '5364160', 'n_tokens_mistral': 405, 'n_tokens_neox': 391, 'n_words': 51}