def test_detachCallback(self):
        page = self.makePage()
        element = self.elementFactory()
        element.setFragmentParent(page)
        element._athenaID = page.addLocalObject(element)

        detachCall = []
        def detached():
            detachCall.append((element.fragmentParent, element.page))
        element.detached = detached

        calls = []
        def callRemote(methodName):
            d = Deferred()
            calls.append(d)
            return d
        element.callRemote = callRemote

        element.detach()

        self.assertEqual(detachCall, [])
        calls[0].callback(None)
        self.assertEqual(detachCall, [(None, None)])
Verify that C{detached} is called C{detach} is called locally.
dataset/ETHPy150Open twisted/nevow/nevow/test/test_athena.py/LiveMixinTestsMixin.test_detachCallback