fix: allow empty CRAWL_LIMIT env value
This commit is contained in:
@@ -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
13
tests/test_config.py
Normal 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
|
||||
Reference in New Issue
Block a user