'Check that the callables are called in the given order, one after the
other.'

def test_callablesCalledInOrder(self):

    log = []
    deferreds = []
    def append(value):
        d = defer.Deferred()
        log.append(value)
        deferreds.append(d)
        return d
    util._runSequentially([(lambda : append('foo')), (lambda : append('bar'))])
    self.assertEqual(log, ['foo'])
    deferreds[(-1)].callback(None)
    self.assertEqual(log, ['foo', 'bar'])
