<commit_before>class TestPalsMockLDAP

  def initialize(options)
    @options = options
    @email = options[:auth][:username]
    @password = options[:auth][:password]
  end

  def bind
    raise 'LDAP error' unless ::EnvironmentVariable.is_true('USE_TEST_PALS_LDAP')

    return Educator.find_by_email(@email).present? && @password == '<PASSWORD>'
  end

  def get_operation_result
  end
end<commit_msg>move mock LDAP password to ENV<commit_after>class TestPalsMockLDAP

  def initialize(options)
    @options = options
    @email = options[:auth][:username]
    @password = options[:auth][:password]
  end

  def bind
    raise 'LDAP error' unless ::EnvironmentVariable.is_true('USE_TEST_PALS_LDAP')

    return false unless email_present?

    return false unless password_correct?

    return true
  end

  def get_operation_result
  end

  private

  def email_present?
    Educator.find_by_email(@email).present?
  end

  def password_correct?
    ENV.fetch('TEST_PALS_LDAP_PASSWORD') == @password
  end
end
{'fraction_non_alphanumeric': 0.09566074950690336, 'fraction_numerical': 0.0, 'mean_word_length': 4.259067357512953, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '7033399', 'n_tokens_mistral': 333, 'n_tokens_neox': 315, 'n_words': 74}