Skip to content

Commit 132b24d

Browse files
committed
Fix test_mixin_state
1 parent e1ed793 commit 132b24d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

reflex/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2465,7 +2465,7 @@ class State(BaseState):
24652465
# The hydrated bool.
24662466
is_hydrated: bool = False
24672467
# Maps the state full_name to an arbitrary token it is linked to for shared state.
2468-
_reflex_internal_links: Field[dict[str, str]] = field(default_factory=dict)
2468+
_reflex_internal_links: dict[str, str] = {}
24692469

24702470
@event
24712471
def set_is_hydrated(self, value: bool) -> None:

tests/units/test_state.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3656,7 +3656,11 @@ def test_mixin_state() -> None:
36563656
"""Test that a mixin state works correctly."""
36573657
assert "num" in UsesMixinState.base_vars
36583658
assert "num" in UsesMixinState.vars
3659-
assert UsesMixinState.backend_vars == {"_backend": 0, "_backend_no_default": {}}
3659+
assert UsesMixinState.backend_vars == {
3660+
"_backend": 0,
3661+
"_backend_no_default": {},
3662+
"_reflex_internal_links": {},
3663+
}
36603664

36613665
assert "computed" in UsesMixinState.computed_vars
36623666
assert "computed" in UsesMixinState.vars

0 commit comments

Comments
 (0)