<commit_before>require File.join(File.dirname(__FILE__), 'test_helper')

class TransformTest < Test::Unit::TestCase


  def setup
    @ldap_dn  = "CN=Ward.Hines.86,OU=people,OU=Steelers,O=NFL,C=US"
    @slash_dn = "/C=US/O=NFL/OU=Steelers/OU=people/CN=Ward.Hines.86"
    super
  end

  def test_ldapify_doesnt_modify_ldap_dn
    assert_equal(@ldap_dn, DistinguishedName::Transform.ldapify(@ldap_dn))
  end

  def test_slashify_doesnt_modify_slash_dn
    assert_equal(@slash_dn, DistinguishedName::Transform.slashify(@slash_dn))
  end

  def test_slashify_accepts_a_comma_separated_version_and_returns_a_slash_separated_version_of_the_dn
    assert_equal(@slash_dn, DistinguishedName::Transform.slashify(@ldap_dn))<commit_msg>using a real player in our fixtures<commit_after>require File.join(File.dirname(__FILE__), 'test_helper')

class TransformTest < Test::Unit::TestCase


  def setup
    @ldap_dn  = "CN=Welker.Wes.83,OU=people,OU=Patriots,O=NFL,C=US"
    @slash_dn = "/C=US/O=NFL/OU=Patriots/OU=people/CN=Welker.Wes.83"
    super
  end

  def test_ldapify_doesnt_modify_ldap_dn
    assert_equal(@ldap_dn, DistinguishedName::Transform.ldapify(@ldap_dn))
  end

  def test_slashify_doesnt_modify_slash_dn
    assert_equal(@slash_dn, DistinguishedName::Transform.slashify(@slash_dn))
  end

  def test_slashify_accepts_a_comma_separated_version_and_returns_a_slash_separated_version_of_the_dn
    assert_equal(@slash_dn, DistinguishedName::Transform.slashify(@ldap_dn))
{'fraction_non_alphanumeric': 0.10597826086956522, 'fraction_numerical': 0.005434782608695652, 'mean_word_length': 6.962162162162162, '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': '1423076', 'n_tokens_mistral': 592, 'n_tokens_neox': 556, 'n_words': 61}