conductor(checkpoint): Test integrity audit complete
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
"""
|
||||
ANTI-SIMPLIFICATION: These tests verify the Context user action simulation.
|
||||
They MUST NOT be simplified. They ensure that file selection, discussion switching,
|
||||
and context truncation are simulated correctly to test the UI's state management.
|
||||
"""
|
||||
from unittest.mock import MagicMock, patch
|
||||
import os
|
||||
import sys
|
||||
@@ -9,6 +14,10 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "s
|
||||
from simulation.sim_context import ContextSimulation
|
||||
|
||||
def test_context_simulation_run() -> None:
|
||||
"""
|
||||
Verifies that the ContextSimulation runs the correct sequence of user actions:
|
||||
discussion switching, context building (md_only), and history truncation.
|
||||
"""
|
||||
mock_client = MagicMock()
|
||||
mock_client.wait_for_server.return_value = True
|
||||
# Mock project config
|
||||
@@ -38,6 +47,7 @@ def test_context_simulation_run() -> None:
|
||||
sim = ContextSimulation(mock_client)
|
||||
sim.run()
|
||||
# Verify calls
|
||||
# ANTI-SIMPLIFICATION: Must assert these specific simulation steps are executed
|
||||
mock_sim.switch_discussion.assert_called_with("main")
|
||||
mock_client.post_project.assert_called()
|
||||
mock_client.click.assert_called_with("btn_md_only")
|
||||
|
||||
Reference in New Issue
Block a user