def extractSuccessfulJSONResult(response):
    result = readBody(response)
    result.addCallback(loads)

    def getResult(data):
        if response.code > 299:
            raise AssertionError((response.code, data))
        return data
    result.addCallback(getResult)
    return result
Helper method to send a shipment with id of send_id
dataset/ETHPy150Open ClusterHQ/flocker/flocker/restapi/testtools.py/extractSuccessfulJSONResult--crossover with--dataset/ETHPy150Open sahana/eden/modules/tests/inv/helper.py/InvTestFunctions.send_shipment