@@ -2242,10 +2242,6 @@ class BackgroundTaskState(BaseState):
22422242 dict_list : dict [str , list [int ]] = {"foo" : [1 , 2 , 3 ]}
22432243 dc : ModelDC = ModelDC ()
22442244
2245- def __init__ (self , ** kwargs ): # noqa: D107
2246- super ().__init__ (** kwargs )
2247- self .router_data = {"simulate" : "hydrate" }
2248-
22492245 @rx .var (cache = False )
22502246 def computed_order (self ) -> list [str ]:
22512247 """Get the order as a computed var.
@@ -2909,7 +2905,7 @@ class BaseFieldSetterState(BaseState):
29092905 assert "c2" in bfss .dirty_vars
29102906
29112907
2912- def exp_is_hydrated (state : BaseState , is_hydrated : bool = True ) -> dict [str , Any ]:
2908+ def exp_is_hydrated (state : type [ BaseState ] , is_hydrated : bool = True ) -> dict [str , Any ]:
29132909 """Expected IS_HYDRATED delta that would be emitted by HydrateMiddleware.
29142910
29152911 Args:
@@ -3006,11 +3002,6 @@ def index():
30063002 app .add_page (index , on_load = test_state .test_handler )
30073003 app ._compile_page ("index" )
30083004
3009- async with mock_root_event_context .state_manager .modify_state (
3010- BaseStateToken (ident = token , cls = State )
3011- ) as state :
3012- state .router_data = {"simulate" : "hydrate" }
3013-
30143005 on_load_internal_name = format .format_event_handler (
30153006 OnLoadInternalState .on_load_internal # pyright: ignore[reportArgumentType]
30163007 )
@@ -3035,7 +3026,7 @@ def index():
30353026 assert len (emitted_deltas ) >= 2
30363027 first_delta = emitted_deltas [0 ][1 ]
30373028 assert first_delta [State .get_full_name ()].pop ("router" + FIELD_MARKER ) is not None
3038- assert first_delta == exp_is_hydrated (state , False )
3029+ assert first_delta == exp_is_hydrated (State , False )
30393030
30403031 # Find the delta containing the test handler's state change
30413032 handler_deltas = [
@@ -3085,10 +3076,6 @@ def index():
30853076
30863077 app .add_page (index , on_load = [OnLoadState .test_handler , OnLoadState .test_handler ])
30873078 app ._compile_page ("index" )
3088- async with mock_root_event_context .state_manager .modify_state (
3089- BaseStateToken (ident = token , cls = State )
3090- ) as state :
3091- state .router_data = {"simulate" : "hydrate" }
30923079
30933080 on_load_internal_name = format .format_event_handler (
30943081 OnLoadInternalState .on_load_internal # pyright: ignore[reportArgumentType]
@@ -3112,7 +3099,7 @@ def index():
31123099 assert len (emitted_deltas ) >= 2
31133100 first_delta = emitted_deltas [0 ][1 ]
31143101 assert first_delta [State .get_full_name ()].pop ("router" + FIELD_MARKER ) is not None
3115- assert first_delta == exp_is_hydrated (state , False )
3102+ assert first_delta == exp_is_hydrated (State , False )
31163103
31173104 # Find deltas containing the test handler's state change (num incremented twice)
31183105 handler_deltas = [
0 commit comments