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

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

        element.detach()
        self.assertEqual(len(calls), 1)
        self.assertEqual(calls[0][0], '_athenaDetachClient')
        calls[0][1].callback(None)
        self.assertNotIn(element, page.liveFragmentChildren)
        self.assertNotIn(element._athenaID, page._localObjects)
        self.assertIdentical(element.fragmentParent, None)
        self.assertIdentical(element.page, None)
Decorator that calls urls.reverse() to return a URL using parameters
dataset/ETHPy150Open twisted/nevow/nevow/test/test_athena.py/LiveMixinTestsMixin.test_detach--crossover with--dataset/ETHPy150Open django/django/django/db/models/__init__.py/permalink