def test_delegate(self):
        """
        Test the delegate method.

        @raise AssertionError: If the test fails
        """
        composite = Composite(self.component_class)
        composite_two = Composite(self.component_class)
        composite_three = Composite(self.component_class)

        composite.add_component(self.leaf_one)
        composite_two.add_component(self.leaf_two)
        composite_three.add_component(self.leaf_three)

        composite_two.add_component(composite_three)
        composite.add_component(composite_two)

        composite._delegate('do_something')

        self.assertTrue(self.leaf_one.did_something)
        self.assertTrue(self.leaf_two.did_something)
        self.assertTrue(self.leaf_three.did_something)

        self.leaf_one.did_something = False
        self.leaf_two.did_something = False
        self.leaf_three.did_something = False

        Test the delegate method.

        @raise AssertionError: If the test fails
        
tests/structural_tests/test_composite.py