reflex/tests/units
Masen Furer aa69234b76
Optimize StateManagerDisk (#4056)
* Simplify StateManagerDisk implementation

* Act more like the memory state manager and only track the root state in self.states
* .load_state always loads a single state or returns None
* .populate_states is the new entry point in loading from disk and it only occurs
  when the root state is not known
* much fast

* StateManagerDisk now acts much more like StateManagerMemory

Treat StateManagerDisk like StateManagerMemory for AppHarness

* Handle root_state deserialized from disk

In this case, we need to initialize the whole state tree, so any non-persistent
states will still get default values, whereas on-disk states will overwrite the
defaults.

* Cache root_state under client_token for StateManagerMemory compatibility

Mainly this just makes it easier for us to write tests that work against either
Disk or Memory state managers.
2024-10-07 09:33:16 -07:00
..
compiler use pathlib as much as possible (#3967) 2024-10-03 17:50:39 +02:00
components support eventspec/eventchain in var operations (#4038) 2024-10-03 15:33:51 -07:00
experimental reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
middleware reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
states reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
utils support eventspec/eventchain in var operations (#4038) 2024-10-03 15:33:51 -07:00
vars reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
__init__.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
conftest.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_app.py remove format_state and override behavior for bare (#3979) 2024-09-26 16:00:28 -07:00
test_attribute_access_type.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_base.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_config.py use pathlib as much as possible (#3967) 2024-10-03 17:50:39 +02:00
test_db_config.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_event.py EventFnArgMismatch fix to support defaults args (#4004) 2024-09-26 13:56:53 -07:00
test_health_endpoint.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_model.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_page.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_prerequisites.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_route.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_sqlalchemy.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_state_tree.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_state.py Optimize StateManagerDisk (#4056) 2024-10-07 09:33:16 -07:00
test_style.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_telemetry.py use pathlib as much as possible (#3967) 2024-10-03 17:50:39 +02:00
test_testing.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_var.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00