MCPcopy
hub / github.com/reflex-dev/reflex / test_class_attributes

Function test_class_attributes

tests/units/test_state.py:499–505  ·  view source on GitHub ↗

Test that we can get class attributes.

()

Source from the content-addressed store, hash-verified

497
498
499def test_class_attributes():
500 """Test that we can get class attributes."""
501 prop = TestState.obj.prop1
502 assert str(prop) == f'{TestState.get_name()}.obj{FIELD_MARKER}?.["prop1"]'
503
504 prop = TestState.complex[1].prop1
505 assert str(prop) == f'{TestState.get_name()}.complex{FIELD_MARKER}?.[1]?.["prop1"]'
506
507
508def test_get_parent_state():

Callers

nothing calls this directly

Calls 1

get_nameMethod · 0.80

Tested by

no test coverage detected