def test_log_filter_positive(self): """filter_swift should filter this message.""" message = ( "Object GET failed: https://example.com/v1/" "auth/container/canary?multipart-manifest=get 304 Not Modified." ) record = LogRecord("test.logger", "WARN", "foo", 1000, message, args=[], exc_info=None) self.assertFalse(filter_swift(record))
def test_log_filter(self): """filter_swift shouldn't filter this message.""" record = LogRecord("test.logger", "WARN", "foo", 1000, "Foo %s", args=('arg', ), exc_info=None) self.assertTrue(filter_swift(record))