2026-07-01 16:42:47 +02:00
|
|
|
"""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
|
|
|
|
|
)
|
2026-07-02 19:54:20 +02:00
|
|
|
from app.capabilities.core.store import get_capability
|
|
|
|
|
from app.capabilities.core.types import BillingUnit
|
2026-07-03 10:51:05 +02:00
|
|
|
from app.capabilities.web.crawl.schemas import CrawlInput, CrawlOutput
|
2026-07-01 16:42:47 +02:00
|
|
|
|
|
|
|
|
pytestmark = pytest.mark.unit
|
|
|
|
|
|
|
|
|
|
|
2026-07-03 10:51:05 +02:00
|
|
|
def test_web_crawl_is_registered_with_its_schemas_and_billing_unit():
|
|
|
|
|
cap = get_capability("web.crawl")
|
2026-07-01 16:42:47 +02:00
|
|
|
|
2026-07-03 10:51:05 +02:00
|
|
|
assert cap.name == "web.crawl"
|
|
|
|
|
assert cap.input_schema is CrawlInput
|
|
|
|
|
assert cap.output_schema is CrawlOutput
|
2026-07-01 16:42:47 +02:00
|
|
|
assert cap.billing_unit is BillingUnit.WEB_CRAWL
|