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)
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)
def test_non_redacted_string_returns_same_string(self): rule = RedactionRule('password='******'password="******"', 'password="******"') message = 'message' assert_true(rule.redact(message) is message)
def test_non_redacted_string_returns_same_string(self): rule = RedactionRule('password='******'password="******"', 'password="******"') message = 'message' assert_true(rule.redact(message) is message)