moo.sdk.tests.test_objects_prefetch
Unit tests for moo.sdk.prefetch_property.
Verifies that prefetch_property correctly pre-warms the session property cache with direct properties, inherited properties (nearest-ancestor-wins), and missing property sentinels — matching the semantics of get_property().
Functions
|
Entries already in the session cache are not overwritten by a subsequent call. |
|
Batch of direct, inherited, and missing cases all resolved in one call. |
|
Object overrides ancestor value → own value wins. |
|
Object with value set directly → cache contains that value. |
|
Empty list is a no-op and does not raise. |
|
Child with no direct property inherits from parent. |
|
Object with no matching property anywhere in the chain → _PROP_MISSING. |
|
Nearest ancestor (min depth) takes priority over a more distant one. |