MCPcopy Create free account
hub / github.com/dot-agent/nextpy / test_get_hooks_nested

Function test_get_hooks_nested

tests/components/test_component.py:517–533  ·  view source on GitHub ↗

Test that a component returns hooks from child components. Args: component1: test component. component2: another component. component3: component with hooks defined.

(component1, component2, component3)

Source from the content-addressed store, hash-verified

515
516
517def test_get_hooks_nested(component1, component2, component3):
518 """Test that a component returns hooks from child components.
519
520 Args:
521 component1: test component.
522 component2: another component.
523 component3: component with hooks defined.
524 """
525 c = component1.create(
526 component2.create(arr=[]),
527 component3.create(),
528 component3.create(),
529 component3.create(),
530 text="a",
531 number=1,
532 )
533 assert c.get_hooks() == component3().get_hooks()
534
535
536def test_get_hooks_nested2(component3, component4):

Callers

nothing calls this directly

Calls 3

component3Function · 0.85
createMethod · 0.45
get_hooksMethod · 0.45

Tested by

no test coverage detected