def METHOD_NAME(self):
    pl = PushLogger.setup_logging("Autopush", sentry_dsn=True)
    log.failure("foo", failure.Failure(ZeroDivisionError(), exc_tb=None))
    self.flushLoggedErrors()
    d = Deferred()
    co = sys._getframe().f_code
    filename = co.co_filename
    testname = co.co_name
    def check():
        logged = self.sentry.logged
        if not logged:  # pragma: nocover
            reactor.callLater(0, check)
            return
        assert len(logged) == 1
        # Ensure a stacktrace was included w/ the current frame as
        # the last entry
        frames = logged[0]['stacktrace']['frames']
        last = frames[-1]
        assert last['abs_path'] == filename
        assert last['function'] == testname
        self._port.stopListening()
        pl.stop()
        d.callback(True)
    reactor.callLater(0, check)
    return d