Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit cffe8e0

Browse files
Fix unit tests
1 parent 3c1719f commit cffe8e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/pipeline/workspace/test_workspace.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import pytest
44

5+
from codegate.db.models import Workspace as WorkspaceModel
56
from codegate.db.models import WorkspaceActive
67
from codegate.pipeline.cli.commands import Workspace
78

@@ -80,7 +81,8 @@ async def test_add_workspaces(args, existing_workspaces, expected_message):
8081
with patch("codegate.workspaces.crud.WorkspaceCrud", autospec=True) as mock_recorder_cls:
8182
mock_recorder = mock_recorder_cls.return_value
8283
workspace_commands.workspace_crud = mock_recorder
83-
mock_recorder.add_workspace = AsyncMock()
84+
created_workspace = WorkspaceModel(id="1", name="myworkspace", system_prompt=None)
85+
mock_recorder.add_workspace = AsyncMock(return_value=created_workspace)
8486

8587
# Call the method
8688
result = await workspace_commands._add_workspace(None, args)

0 commit comments

Comments
 (0)