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

Commit 53b7769

Browse files
Add /api/v1 routes to openapi spec
It was missing an import
1 parent 801fcc3 commit 53b7769

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

tests/pipeline/workspace/test_workspace.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ async def test_add_workspaces(args, existing_workspaces, expected_message):
7777
workspace_commands._db_reader = mock_db_reader
7878

7979
# We'll also patch DbRecorder to ensure no real DB operations happen
80-
with patch(
81-
"codegate.pipeline.cli.commands.WorkspaceCrud", autospec=True
82-
) as mock_recorder_cls:
80+
with patch("codegate.pipeline.cli.commands.WorkspaceCrud", autospec=True) as mock_recorder_cls:
8381
mock_recorder = mock_recorder_cls.return_value
8482
workspace_commands.workspace_crud = mock_recorder
8583
mock_recorder.add_workspace = AsyncMock()
@@ -115,9 +113,7 @@ async def test_parse_execute_cmd(
115113
"""
116114
workspace_commands = Workspace()
117115

118-
with patch.object(
119-
workspace_commands, "run", return_value=mocked_execute_response
120-
) as mock_run:
116+
with patch.object(workspace_commands, "run", return_value=mocked_execute_response) as mock_run:
121117
result = await workspace_commands.exec(user_message)
122118
assert result == mocked_execute_response
123119

tests/test_server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def test_health_check(test_client: TestClient) -> None:
8181
assert response.status_code == 200
8282
assert response.json() == {"status": "healthy"}
8383

84+
8485
@patch("codegate.dashboard.dashboard.fetch_latest_version", return_value="foo")
8586
def test_version_endpoint(mock_fetch_latest_version, test_client: TestClient) -> None:
8687
"""Test the version endpoint."""
@@ -89,11 +90,12 @@ def test_version_endpoint(mock_fetch_latest_version, test_client: TestClient) ->
8990

9091
response_data = response.json()
9192

92-
assert response_data["current_version"] == __version__.lstrip('v')
93+
assert response_data["current_version"] == __version__.lstrip("v")
9394
assert response_data["latest_version"] == "foo"
9495
assert isinstance(response_data["is_latest"], bool)
9596
assert response_data["is_latest"] is False
9697

98+
9799
@patch("codegate.pipeline.secrets.manager.SecretsManager")
98100
@patch("codegate.server.ProviderRegistry")
99101
def test_provider_registration(mock_registry, mock_secrets_mgr, mock_pipeline_factory) -> None:

0 commit comments

Comments
 (0)