20 lines
604 B
Python
20 lines
604 B
Python
from app.search_agent_adapter import AgentSearchContext, OpenClawSearchClient
|
|
|
|
|
|
class FakeOrchestrator:
|
|
def execute(self, payload):
|
|
return payload
|
|
|
|
|
|
def test_agent_adapter_keeps_agent_identity_and_profile():
|
|
client = OpenClawSearchClient(FakeOrchestrator())
|
|
result = client.search_public(
|
|
"latest framework",
|
|
AgentSearchContext(
|
|
agent="openclaw",
|
|
group_profile={"domain_profiles": ["software_library"]},
|
|
),
|
|
)
|
|
assert result["requester"] == "openclaw"
|
|
assert result["group_profile"]["domain_profiles"] == ["software_library"]
|