fix: allow empty CRAWL_LIMIT env value
This commit is contained in:
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