refactor(tests): Add strict type hints to third batch of test files

This commit is contained in:
2026-02-28 19:16:19 -05:00
parent 579ee8394f
commit e8513d563b
10 changed files with 37 additions and 29 deletions

View File

@@ -6,13 +6,14 @@ import time
import json
import requests
import sys
from typing import Any
# Ensure project root is in path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from api_hook_client import ApiHookClient
def simulate_conductor_phase_completion(client: ApiHookClient):
def simulate_conductor_phase_completion(client: ApiHookClient) -> dict[str, Any]:
"""
Simulates the Conductor agent's logic for phase completion using ApiHookClient.
"""
@@ -33,7 +34,7 @@ def simulate_conductor_phase_completion(client: ApiHookClient):
results["verification_message"] = f"Automated verification failed: {e}"
return results
def test_conductor_integrates_api_hook_client_for_verification(live_gui):
def test_conductor_integrates_api_hook_client_for_verification(live_gui: Any) -> None:
"""
Verify that Conductor's simulated phase completion logic properly integrates
and uses the ApiHookClient for verification against the live GUI.
@@ -43,7 +44,7 @@ def test_conductor_integrates_api_hook_client_for_verification(live_gui):
assert results["verification_successful"] is True
assert "successfully" in results["verification_message"]
def test_conductor_handles_api_hook_failure(live_gui):
def test_conductor_handles_api_hook_failure(live_gui: Any) -> None:
"""
Verify Conductor handles a simulated API hook verification failure.
We patch the client's get_status to simulate failure even with live GUI.