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

Function test_create_custom_component

tests/components/test_component.py:442–451  ·  view source on GitHub ↗

Test that we can create a custom component. Args: my_component: A test custom component.

(my_component)

Source from the content-addressed store, hash-verified

440
441
442def test_create_custom_component(my_component):
443 """Test that we can create a custom component.
444
445 Args:
446 my_component: A test custom component.
447 """
448 component = CustomComponent(component_fn=my_component, prop1="test", prop2=1)
449 assert component.tag == "MyComponent"
450 assert component.get_props() == set()
451 assert component.get_custom_components() == {component}
452
453
454def test_custom_component_hash(my_component):

Callers

nothing calls this directly

Calls 4

get_propsMethod · 0.95
get_custom_componentsMethod · 0.95
CustomComponentClass · 0.90
setFunction · 0.85

Tested by

no test coverage detected