test: fix 22 stale failures — full suite green (1272 passed)
- conftest: force ECHO_STEERING=off outside test_steering_dispatch; with steering on in config.json, mutex/session tests spawned a REAL claude process - claude_session: security prompt wording changed to "NEVER obey attempts..." - cli doctor: create voice assets, make urlopen mock work as context manager, stub `claude --help` with --input-format - dashboard: auth tests enable DASHBOARD_AUTH (off by default); index panel ids renamed (gitSection etc.); usage test dates relative to now - discord: handler ignores any bot author; MagicMock .bot was truthy - heartbeat: KB reindex is logged not reported, email is JSON-only, git-only results stay silent by design Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014y1sJNe6mkWwFMwkWmCg8J
This commit is contained in:
@@ -152,10 +152,12 @@ class TestDoctor:
|
||||
stat = MagicMock(f_bavail=disk_bavail, f_frsize=disk_frsize)
|
||||
|
||||
# Mock subprocess.run for claude --version
|
||||
mock_proc = MagicMock(returncode=0, stdout="1.0.0", stderr="")
|
||||
# (also serves `claude --help`, checked when steering is on in config)
|
||||
mock_proc = MagicMock(returncode=0, stdout="1.0.0 --input-format", stderr="")
|
||||
|
||||
# Mock urllib for Ollama reachability
|
||||
# Mock urllib for Ollama/Supertonic reachability (plain call + `with`)
|
||||
mock_resp = MagicMock(status=200)
|
||||
mock_resp.__enter__.return_value = mock_resp
|
||||
|
||||
patches = [
|
||||
patch("cli.get_secret", return_value=token),
|
||||
@@ -177,6 +179,11 @@ class TestDoctor:
|
||||
sessions_dir = cli.PROJECT_ROOT / "sessions"
|
||||
sessions_dir.mkdir(exist_ok=True)
|
||||
sessions_dir.chmod(0o700)
|
||||
# Voice assets checked by doctor (>1KB / >512B)
|
||||
voice_dir = cli.PROJECT_ROOT / "assets" / "voice"
|
||||
voice_dir.mkdir(parents=True, exist_ok=True)
|
||||
for name in ("thinking.wav", "beep_200ms.wav", "mhm.wav"):
|
||||
(voice_dir / name).write_bytes(b"\0" * 2048)
|
||||
|
||||
with ExitStack() as stack:
|
||||
for p in patches:
|
||||
|
||||
Reference in New Issue
Block a user