

def flushEventualQueue(value=None):
    'This returns a Deferred which fires when the eventual-send queue is\n    finally empty. This is useful to wait upon as the last step of a Trial\n    test method. If an argument is provided, the Deferred will fire with it,\n    making this useful at the end of a unit test:\n\n        d = some_stuff_that_uses_eventual_sends()\n        d.addBoth(flushEventualQueue)\n        return d\n    '
    d = _theSimpleQueue.flush()
    d.addBoth((lambda _: value))
    return value

dataset/ETHPy150Open warner/petmail/petmail/eventual.py flushEventualQueue/VarMisuse@35/197 `d`->`value`