'Call the given assertion function against the current result of a
Deferred.'

def assertDeferredResult(self, deferred, assertFunction, *args, **kwargs):

    result = []
    deferred.addCallback(result.append)
    assertFunction(result[0], *args, **kwargs)
