コード例 #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)