Compare commits
2 Commits
48d111d9b6
...
e2a96edf2e
| Author | SHA1 | Date | |
|---|---|---|---|
| e2a96edf2e | |||
| 194626e5ab |
@@ -33,7 +33,7 @@
|
|||||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Asyncio & Logging' (Protocol in workflow.md)
|
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Asyncio & Logging' (Protocol in workflow.md)
|
||||||
|
|
||||||
## Phase 3: Assertion Implementation & Legacy Cleanup
|
## Phase 3: Assertion Implementation & Legacy Cleanup
|
||||||
- [ ] Task: Replace `pytest.fail` with Functional Assertions (`api_events`, `execution_engine`)
|
- [x] Task: Replace `pytest.fail` with Functional Assertions (`api_events`, `execution_engine`) [194626e]
|
||||||
- [ ] WHERE: `tests/test_api_events.py:40`, `tests/test_execution_engine.py:45`.
|
- [ ] WHERE: `tests/test_api_events.py:40`, `tests/test_execution_engine.py:45`.
|
||||||
- [ ] WHAT: Implement actual `assert` statements testing the mock calls and status updates.
|
- [ ] WHAT: Implement actual `assert` statements testing the mock calls and status updates.
|
||||||
- [ ] HOW: Use `MagicMock.assert_called_with` and check `ticket.status == "completed"`.
|
- [ ] HOW: Use `MagicMock.assert_called_with` and check `ticket.status == "completed"`.
|
||||||
|
|||||||
@@ -35,9 +35,6 @@ def test_event_emission() -> None:
|
|||||||
ai_client.events.emit("test_event", payload={"data": 123})
|
ai_client.events.emit("test_event", payload={"data": 123})
|
||||||
callback.assert_called_once_with(payload={"data": 123})
|
callback.assert_called_once_with(payload={"data": 123})
|
||||||
|
|
||||||
def test_send_emits_events() -> None:
|
|
||||||
pytest.fail("TODO: This test is mocked incorrectly and asserts nothing. Use _proper version below.")
|
|
||||||
|
|
||||||
def test_send_emits_events_proper() -> None:
|
def test_send_emits_events_proper() -> None:
|
||||||
with patch("ai_client._ensure_gemini_client"), \
|
with patch("ai_client._ensure_gemini_client"), \
|
||||||
patch("ai_client._gemini_client") as mock_client:
|
patch("ai_client._gemini_client") as mock_client:
|
||||||
|
|||||||
@@ -39,11 +39,12 @@ def test_execution_engine_basic_flow() -> None:
|
|||||||
assert len(ready) == 0
|
assert len(ready) == 0
|
||||||
|
|
||||||
def test_execution_engine_update_nonexistent_task() -> None:
|
def test_execution_engine_update_nonexistent_task() -> None:
|
||||||
dag = TrackDAG([])
|
t1 = Ticket(id="T1", description="Task 1", status="todo", assigned_to="worker")
|
||||||
|
dag = TrackDAG([t1])
|
||||||
engine = ExecutionEngine(dag)
|
engine = ExecutionEngine(dag)
|
||||||
# Should not raise error, or handle gracefully
|
# Should not raise error, or handle gracefully
|
||||||
engine.update_task_status("NONEXISTENT", "completed")
|
engine.update_task_status("NONEXISTENT", "completed")
|
||||||
pytest.fail("TODO: Implement assertions")
|
assert t1.status == "todo"
|
||||||
|
|
||||||
def test_execution_engine_status_persistence() -> None:
|
def test_execution_engine_status_persistence() -> None:
|
||||||
t1 = Ticket(id="T1", description="Task 1", status="todo", assigned_to="worker")
|
t1 = Ticket(id="T1", description="Task 1", status="todo", assigned_to="worker")
|
||||||
|
|||||||
Reference in New Issue
Block a user