fix: require current a2a init scaffold
All checks were successful
build / build (push) Successful in 26s
All checks were successful
build / build (push) Successful in 26s
This commit is contained in:
@@ -2,7 +2,10 @@ from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from agent_builder.tools import _render_a2a_init_template
|
||||
from agent_builder.tools import (
|
||||
_assert_current_a2a_init_template,
|
||||
_render_a2a_init_template,
|
||||
)
|
||||
|
||||
|
||||
class TemplateInitTests(unittest.TestCase):
|
||||
@@ -25,3 +28,10 @@ class TemplateInitTests(unittest.TestCase):
|
||||
def test_render_a2a_init_template_rejects_invalid_names(self) -> None:
|
||||
with self.assertRaises(ValueError):
|
||||
_render_a2a_init_template("Bad Name")
|
||||
|
||||
def test_stale_sdk_template_is_rejected(self) -> None:
|
||||
with self.assertRaisesRegex(RuntimeError, "stale"):
|
||||
_assert_current_a2a_init_template({
|
||||
"agent.py": "from a2a_pack import A2AAgent",
|
||||
"requirements.txt": "httpx>=0.27",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user