Test getting age of status.
(self)
| 225 | assert stale_status.is_stale(timeout_seconds=30) |
| 226 | |
| 227 | def test_get_age_seconds(self): |
| 228 | """Test getting age of status.""" |
| 229 | now = time.time() |
| 230 | status = DaemonStatus( |
| 231 | state=DaemonState.IDLE, |
| 232 | message="Ready", |
| 233 | updated_at=now - 10, # 10 seconds ago |
| 234 | ) |
| 235 | |
| 236 | age = status.get_age_seconds() |
| 237 | assert age >= 10.0 # Should be at least 10 seconds |
| 238 | |
| 239 | |
| 240 | class TestDaemonState: |
nothing calls this directly
no test coverage detected