mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-01 01:18:34 +00:00
The three Postgres prefetch tests warm the cache, then run a series of per-object getters against a MagicMock stand-in for the DB, asserting 'getters must be served from the prefetched cache'. When the test's real-time DB writes and prefetch round-trip exceed DEFAULT_IN_MEMORY_TTL (5s), the org cache entry expires and get_org_object falls through to the MagicMock, producing 'TypeError: object MagicMock can't be used in await expression' at the assertion point. Freeze the in-memory cache clock with clock=lambda: 0.0 so entries never tick past their TTL during the test. The behaviour under test (join + prefetch + cache serve) is unaffected. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| auth | ||
| management | ||
| spend | ||
| __init__.py | ||