From af2aafbc0a2b8af682e7bb684350bda0acff7a92 Mon Sep 17 00:00:00 2001 From: a2a-cloud Date: Mon, 13 Jul 2026 12:20:41 +0000 Subject: [PATCH] a2a-source-edit: remove tests/test_agent.py --- tests/test_agent.py | 64 --------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 tests/test_agent.py diff --git a/tests/test_agent.py b/tests/test_agent.py deleted file mode 100644 index ce65e6d..0000000 --- a/tests/test_agent.py +++ /dev/null @@ -1,64 +0,0 @@ -import pytest - -from a2a_pack import NoAuth -from a2a_pack.context import LocalRunContext - -from agent import CustomerIntegrationEngineer, SmokeCallInput - - -@pytest.mark.asyncio -async def test_source_policy_rejects_code_editor_agent(): - agent = CustomerIntegrationEngineer() - ctx = LocalRunContext(auth=NoAuth()) - - result = await agent.review_source_change_policy( - ctx, - mutated_source=False, - critical_defect_remaining=False, - used_code_editor_agent=True, - improvement_iterations=0, - ) - - assert result["ok"] is False - failed = {check["name"] for check in result["checks"] if not check["ok"]} - assert "no_code_editor_agent" in failed - - -@pytest.mark.asyncio -async def test_smoke_call_rejects_secret_like_result(): - agent = CustomerIntegrationEngineer() - ctx = LocalRunContext(auth=NoAuth()) - - result = await agent.validate_smoke_call( - ctx, - SmokeCallInput( - skill_name="validate_live_card", - input_args={"bounded": True}, - result={"ok": True, "api_key": "sk-testsecret1234567890"}, - status_code=200, - used_workspace_delegation=True, - delegated_workspace_mode="read_only", - ), - ) - - assert result["ok"] is False - failed = {check["name"] for check in result["checks"] if not check["ok"]} - assert "no_secrets_returned" in failed - assert "$.api_key" in result["secret_like_paths"] - - -@pytest.mark.asyncio -async def test_final_report_passes_with_clean_validations(): - agent = CustomerIntegrationEngineer() - ctx = LocalRunContext(auth=NoAuth()) - - result = await agent.final_release_report( - ctx, - validation_results=[{"checks": [{"name": "sample", "ok": True}]}], - reviewer_findings=[], - warnings_to_accept=[], - ) - - assert result["ok"] is True - assert result["critical_findings"] == [] - assert result["secrets_included"] is False