Spaces:
Running
Running
File size: 511 Bytes
f049d1e | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import pytest
from registry import normalize_tool
def test_normalization_rejects_extra_fields():
raw = {"name": "test", "description": "desc", "parameters": {"type": "object"}, "extra_field": "bad"}
with pytest.raises(ValueError, match="unexpected fields"):
normalize_tool(raw)
def test_normalization_rejects_empty_name():
raw = {"name": "", "description": "desc", "parameters": {"type": "object"}}
with pytest.raises(ValueError, match="non-empty string"):
normalize_tool(raw)
|