def METHOD_NAME(self):
    level, msg = logging.WARNING, "Test event, can be ignored exception"
    try:
        raise TestException(msg)
    except TestException:
        exc_info = sys.exc_info()
    self.log(level, msg, exc_info)
    level = "warning"
    self.assertEventCaptured(self.client, level, msg)