Ejemplo n.º 1
0
    def test_replace(self):
        # Ensure we can replace a child component.
        c0 = Component()
        c1 = Component()
        c2 = Component()

        c0.add('c', c1)
        self.assertEqual(id(c0.c), id(c1))

        c0.replace('c', c2)
        self.assertEqual(id(c0.c), id(c2))