<commit_before>require 'test_helper'

class HasherTest < Test::Unit::TestCase
  context ".taskdb_hash" do
    should "return a MD5 hexdigest" do
      assert_equal Twingly::URL::Hasher.taskdb_hash("http://blog.twingly.com/"),
        "B1E2D5AECF6649C2E44D17AEA3E0F4"
    end
  end

  context ".blogstream_hash" do
    should "return a MD5 hexdigest" do
      assert_equal Twingly::URL::Hasher.blogstream_hash("http://blog.twingly.com/"),
        "B1E2D5AECF6649C2E44D17AEA3E0F4"
    end
  end

  context ".documentdb_hash" do
    should "return a SHA256 unsigned long, native endian digest" do
      assert_equal Twingly::URL::Hasher.documentdb_hash("http://blog.twingly.com/"),
        15340752212397415993
    end
  end

  context ".autopingdb_hash" do
    should "return a SHA256 64-bit signed, native endian digest" do
      assert_equal Twingly::URL::Hasher.autopingdb_hash("http://blog.twingly.com/"),
        -3105991861312135623
    end
  end
end<commit_msg>Add test for pingloggerdb_hash<commit_after>require 'test_helper'

class HasherTest < Test::Unit::TestCase
  context ".taskdb_hash" do
    should "return a MD5 hexdigest" do
      assert_equal Twingly::URL::Hasher.taskdb_hash("http://blog.twingly.com/"),
        "B1E2D5AECF6649C2E44D17AEA3E0F4"
    end
  end

  context ".blogstream_hash" do
    should "return a MD5 hexdigest" do
      assert_equal Twingly::URL::Hasher.blogstream_hash("http://blog.twingly.com/"),
        "B1E2D5AECF6649C2E44D17AEA3E0F4"
    end
  end

  context ".documentdb_hash" do
    should "return a SHA256 unsigned long, native endian digest" do
      assert_equal Twingly::URL::Hasher.documentdb_hash("http://blog.twingly.com/"),
        15340752212397415993
    end
  end

  context ".autopingdb_hash" do
    should "return a SHA256 64-bit signed, native endian digest" do
      assert_equal Twingly::URL::Hasher.autopingdb_hash("http://blog.twingly.com/"),
        -3105991861312135623
    end
  end

  context ".pingloggerdb_hash" do
    should "return a SHA256 64-bit unsigned, native endian digest" do
      assert_equal Twingly::URL::Hasher.pingloggerdb_hash("http://blog.twingly.com/"),
        15340752212397415993
    end
  end
end
{'fraction_non_alphanumeric': 0.10393772893772894, 'fraction_numerical': 0.08379120879120878, 'mean_word_length': 3.619450317124736, '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': '5415869', 'n_tokens_mistral': 867, 'n_tokens_neox': 773, 'n_words': 160}