SurfSense/surfsense_backend/tests/unit/capabilities/test_registry.py
CREDO23 9fe9c5b71d feat(capabilities): replace web.scrape/web.discover with unified web.crawl
web.crawl scrapes a single URL (maxCrawlDepth=0) or spiders a whole site,
backed by the proprietary site_crawler engine. Rewires the scraping subagent
tools and capability tests onto the new verb.
2026-07-03 10:51:05 +02:00

23 lines
739 B
Python

"""The registry exposes each verb as one Capability entry the doors/agent read from."""
from __future__ import annotations
import pytest
from app.capabilities import (
web, # noqa: F401 — importing the namespace registers its verbs
)
from app.capabilities.core.store import get_capability
from app.capabilities.core.types import BillingUnit
from app.capabilities.web.crawl.schemas import CrawlInput, CrawlOutput
pytestmark = pytest.mark.unit
def test_web_crawl_is_registered_with_its_schemas_and_billing_unit():
cap = get_capability("web.crawl")
assert cap.name == "web.crawl"
assert cap.input_schema is CrawlInput
assert cap.output_schema is CrawlOutput
assert cap.billing_unit is BillingUnit.WEB_CRAWL