def cbRendered2(ignored):

    def cbRendered(ignored):
        self.assertEqual(b''.join(request.written), b''.join(request2.written))
    d.addCallback(cbRendered)
    return d
def cbRendered2(ignored):

    def cbRendered(ignored):
        self.assertEqual(b.join(request.written), b.join(request2.written))
    d.addCallback(cbRendered)
    return d