예제 #1
0
파일: tests.py 프로젝트: cloudera/hue
  def test_redaction_rule_works(self):
    rule = RedactionRule('password='******'password="******"', 'password="******"')

    test_strings = [
        ('message', 'message'),
        ('password="******"', 'password="******"'),
        ('before password="******" after', 'before password="******" after'),
    ]

    for message, redacted_message in test_strings:
      assert_equal(rule.redact(message), redacted_message)
예제 #2
0
파일: tests.py 프로젝트: xuejunshuang/hue
  def test_redaction_rule_works(self):
    rule = RedactionRule('password='******'password="******"', 'password="******"')

    test_strings = [
        ('message', 'message'),
        ('password="******"', 'password="******"'),
        ('before password="******" after', 'before password="******" after'),
    ]

    for message, redacted_message in test_strings:
      assert_equal(rule.redact(message), redacted_message)
예제 #3
0
파일: tests.py 프로젝트: cloudera/hue
  def test_non_redacted_string_returns_same_string(self):
    rule = RedactionRule('password='******'password="******"', 'password="******"')

    message = 'message'
    assert_true(rule.redact(message) is message)
예제 #4
0
파일: tests.py 프로젝트: xuejunshuang/hue
  def test_non_redacted_string_returns_same_string(self):
    rule = RedactionRule('password='******'password="******"', 'password="******"')

    message = 'message'
    assert_true(rule.redact(message) is message)