'Test a call to L{util.LocalAsyncForwarder} using L{Forwarded} local
object.'

def test_localAsyncForwarder(self):

    f = Forwarded()
    lf = util.LocalAsyncForwarder(f, IForwarded)
    lf.callRemote('forwardMe')
    self.assertTrue(f.forwarded)
    lf.callRemote('dontForwardMe')
    self.assertFalse(f.unforwarded)
    rr = lf.callRemote('forwardDeferred')
    l = []
    rr.addCallback(l.append)
    self.assertEqual(l[0], 1)
