mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
feat: validate web.crawl start URLs
This commit is contained in:
parent
797dd2df47
commit
a123c95703
2 changed files with 8 additions and 1 deletions
|
|
@ -20,6 +20,11 @@ def test_requires_at_least_one_start_url() -> None:
|
|||
CrawlInput(startUrls=[])
|
||||
|
||||
|
||||
def test_rejects_malformed_start_url() -> None:
|
||||
with pytest.raises(ValidationError):
|
||||
CrawlInput(startUrls=["not-a-url"])
|
||||
|
||||
|
||||
def test_camelcase_fields_and_defaults() -> None:
|
||||
model = CrawlInput(startUrls=["https://e.com"])
|
||||
assert model.startUrls == ["https://e.com"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue