test_state: disable local def handling for dupe-detection test

This commit is contained in:
Masen Furer 2024-10-08 17:45:42 -07:00
parent 9b999e2511
commit 3e0c31cfd6
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95

View File

@ -2502,7 +2502,10 @@ def test_mutable_copy_vars(mutable_state: MutableTestState, copy_func: Callable)
def test_duplicate_substate_class(mocker):
# Neuter pytest escape hatch, because we want to test duplicate detection.
mocker.patch("reflex.state.is_testing_env", lambda: False)
# Neuter <locals> state handling since these _are_ defined inside a function.
mocker.patch("reflex.state.BaseState._handle_local_def", lambda: None)
with pytest.raises(ValueError):
class TestState(BaseState):