fix: allow empty CRAWL_LIMIT env value

This commit is contained in:
Anton
2026-04-29 12:49:58 +03:00
parent 86330885e3
commit 765efa1a1c
5 changed files with 26 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ def test_health_returns_versions():
response = client.get("/api/health")
assert response.status_code == 200
assert response.json()["backend_version"] == "0.2.6"
assert response.json()["backend_version"] == "0.2.7"
def test_mcp_requires_token_and_lists_tools():

13
tests/test_config.py Normal file
View File

@@ -0,0 +1,13 @@
from app.config import Settings
def test_empty_crawl_limit_is_treated_as_none():
settings = Settings(crawl_limit="")
assert settings.crawl_limit is None
def test_numeric_crawl_limit_is_parsed():
settings = Settings(crawl_limit="25")
assert settings.crawl_limit == 25