<commit_before>describe "Report" do

  let(:user) { User.get_from_ENV }
  let(:block_list) {
    block_list = BlockList.create(name: 'testlist')
    Admin.create(user: user, block_list: block_list)
    block_list
  }
  let(:report_parent) { Report.parse_objects(
    block_list: block_list,
    target: User.first,
    text: 'parent report',
    reporter: user,
  ) }
  let(:report_child) { Report.parse_objects(
    block_list: BlockList.first,
    target: User.first,
    text: 'child report',
    reporter: user,
    parent_id: report_parent.id,
  ) }

  context 'parse_objects' do
    it 'creates a report' do
      expect(report_parent.id).to be_a(Integer)
    end

    it 'auto approves reports' do
      expect(report_parent.approver).to be(user)
    end

    it 'sets parent attribute on child reports' do
      expect(report_child.parent.id).to be(report_parent.id)<commit_msg>set reporter and target to same user for specs<commit_after>describe "Report" do

  let(:user) { User.get_from_ENV }
  let(:block_list) {
    block_list = BlockList.create(name: 'testlist')
    Admin.create(user: user, block_list: block_list)
    block_list
  }
  let(:report_parent) { Report.parse_objects(
    block_list: block_list,
    target: user,
    text: 'parent report',
    reporter: user,
  ) }
  let(:report_child) { Report.parse_objects(
    block_list: BlockList.first,
    target: user,
    text: 'child report',
    reporter: user,
    parent_id: report_parent.id,
  ) }

  context 'parse_objects' do
    it 'creates a report' do
      expect(report_parent.id).to be_a(Integer)
    end

    it 'auto approves reports' do
      expect(report_parent.approver).to be(user)
    end

    it 'sets parent attribute on child reports' do
      expect(report_child.parent.id).to be(report_parent.id)
{'fraction_non_alphanumeric': 0.10931399888455103, 'fraction_numerical': 0.0, 'mean_word_length': 3.407862407862408, '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': '2469155', 'n_tokens_mistral': 608, 'n_tokens_neox': 599, 'n_words': 141}