import pytest from app.services.session_policy import ( ALLOWED_SESSION_TIMEOUT_SET, DEFAULT_SESSION_TIMEOUT_MINUTES, validate_session_timeout_minutes, ) def test_default_session_is_one_week(): assert DEFAULT_SESSION_TIMEOUT_MINUTES == 10_080 def test_allowed_session_timeouts_cover_one_hour_to_ninety_days(): assert min(ALLOWED_SESSION_TIMEOUT_SET) == 60 assert max(ALLOWED_SESSION_TIMEOUT_SET) == 129_600 def test_validate_session_timeout_rejects_unknown_values(): with pytest.raises(ValueError): validate_session_timeout_minutes(90)