feat(simulation): implement project scaffolding and discussion loop logic
This commit is contained in:
28
tests/test_workflow_sim.py
Normal file
28
tests/test_workflow_sim.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
# Ensure project root is in path
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
from simulation.workflow_sim import WorkflowSimulator
|
||||
|
||||
def test_simulator_instantiation():
|
||||
client = MagicMock()
|
||||
sim = WorkflowSimulator(client)
|
||||
assert sim is not None
|
||||
|
||||
def test_setup_new_project():
|
||||
client = MagicMock()
|
||||
sim = WorkflowSimulator(client)
|
||||
|
||||
# Mock responses for wait_for_server
|
||||
client.wait_for_server.return_value = True
|
||||
|
||||
sim.setup_new_project("TestProject", "/tmp/test_git")
|
||||
|
||||
# Verify hook calls
|
||||
client.click.assert_any_call("btn_project_new")
|
||||
client.set_value.assert_any_call("project_git_dir", "/tmp/test_git")
|
||||
client.click.assert_any_call("btn_project_save")
|
||||
Reference in New Issue
Block a user