22 lines
491 B
Python
22 lines
491 B
Python
import pytest
|
|
from pydantic import ValidationError
|
|
|
|
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
|
|
|
|
|
|
def test_mcp_auth_mode_rejects_oauth_or_token_fallback():
|
|
with pytest.raises(ValidationError):
|
|
Settings(mcp_auth_mode="oauth_or_token")
|