MCPcopy
hub / github.com/streamlit/streamlit / test_auth_cache

Method test_auth_cache

lib/tests/streamlit/auth_util_test.py:110–116  ·  view source on GitHub ↗

Test AuthCache basic functionality.

(self)

Source from the content-addressed store, hash-verified

108 """Test auth utils."""
109
110 def test_auth_cache(self):
111 """Test AuthCache basic functionality."""
112 cache = AuthCache()
113 cache.set("key1", "value1", 3600)
114 assert cache.get("key1") == "value1"
115 cache.delete("key1")
116 assert cache.get("key1") is None
117
118 @patch(
119 "streamlit.auth_util.secrets_singleton",

Callers

nothing calls this directly

Calls 4

setMethod · 0.95
getMethod · 0.95
deleteMethod · 0.95
AuthCacheClass · 0.90

Tested by

no test coverage detected