MCPcopy Create free account
hub / github.com/google/adk-python / test_app_cache_config_defaults

Method test_app_cache_config_defaults

tests/unittests/apps/test_apps.py:117–130  ·  view source on GitHub ↗

Test that cache config has proper defaults when created.

(self)

Source from the content-addressed store, hash-verified

115 assert app.resumability_config.is_resumable
116
117 def test_app_cache_config_defaults(self):
118 """Test that cache config has proper defaults when created."""
119 mock_agent = Mock(spec=BaseAgent)
120 cache_config = ContextCacheConfig() # Use defaults
121
122 app = App(
123 name="default_cache_app",
124 root_agent=mock_agent,
125 context_cache_config=cache_config,
126 )
127
128 assert app.context_cache_config.cache_intervals == 10 # Default
129 assert app.context_cache_config.ttl_seconds == 1800 # Default 30 minutes
130 assert app.context_cache_config.min_tokens == 0 # Default
131
132 def test_app_context_cache_config_is_optional(self):
133 """Test that context_cache_config is truly optional."""

Callers

nothing calls this directly

Calls 2

ContextCacheConfigClass · 0.90
AppClass · 0.90

Tested by

no test coverage detected