[kimi] test: add comprehensive tests for config.py (#648) #693
Reference in New Issue
Block a user
Delete Branch "kimi/issue-648"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #648
Summary
tests/test_config_module.pywith 48 tests covering all public functions and classes insrc/config.pySettings()instantiationAGENT_NAME,OLLAMA_URL,DEBUG,TIMMY_ENVoverride defaultstrue/false/1/0), int parsing, Literal rejection of invalid values, extra field ignoringnormalize_ollama_url: localhost replacement, IP preservation, multiple occurrences_compute_repo_root: Auto-detection and explicit overridemodel_post_init: Gitea token from env and file fallbackcheck_ollama_model_available: Network errors, model found/not foundget_effective_ollama_model: Primary available, fallback chain, nothing availablevalidate_startup: Test mode skip, dev warnings, production exits on missing secrets/CORS wildcard, production passes with secrets, idempotencyAPP_START_TIME: Type and timezone checksTest plan
tox -e formatcleantox -e lintcleantox -e unit— all 2205 tests passtox -e pre-push— full CI suite passes