Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ FakeClock
Class
FakeClock
tests/lib/test_credentials.py:1346–1351 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1344
1345
1346
class
FakeClock:
1347
def
__init__(self, now: float = 1000.0) -> None:
1348
self.now = now
1349
1350
def
__call__(self) -> float:
1351
return
self.now
1352
1353
1354
class
CountingProvider:
Callers
9
test_first_call_fetches
Method · 0.85
test_no_expiry_never_refreshes
Method · 0.85
test_fresh_token_not_refetched
Method · 0.85
test_advisory_refresh_success
Method · 0.85
test_advisory_refresh_failure_serves_stale
Method · 0.85
test_mandatory_refresh_failure_raises
Method · 0.85
test_expired_is_mandatory
Method · 0.85
test_advisory_caller_skips_when_refresh_in_flight
Method · 0.85
test_advisory_refresh_backoff_after_failure
Method · 0.85
Calls
no outgoing calls
Tested by
9
test_first_call_fetches
Method · 0.68
test_no_expiry_never_refreshes
Method · 0.68
test_fresh_token_not_refetched
Method · 0.68
test_advisory_refresh_success
Method · 0.68
test_advisory_refresh_failure_serves_stale
Method · 0.68
test_mandatory_refresh_failure_raises
Method · 0.68
test_expired_is_mandatory
Method · 0.68
test_advisory_caller_skips_when_refresh_in_flight
Method · 0.68
test_advisory_refresh_backoff_after_failure
Method · 0.68