This repository was archived by the owner on Jun 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed
pipeline/codegate_context_retriever Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ def _load_existing_certificates(self) -> None:
173
173
self ._cert_cache [common_name ] = CachedCertificate (
174
174
cert_path = cert_path ,
175
175
key_path = key_path ,
176
- creation_time = datetime .utcnow ( ),
176
+ creation_time = datetime .now ( datetime . UTC ),
177
177
)
178
178
else :
179
179
logger .debug (f"Skipping expired certificate for { common_name } " )
Original file line number Diff line number Diff line change @@ -68,9 +68,7 @@ async def process(
68
68
69
69
# Vector search to find bad packages
70
70
storage_engine = StorageEngine ()
71
- searched_objects = await storage_engine .search (
72
- query = user_messages , distance = 0.8 , limit = 100
73
- )
71
+ searched_objects = await storage_engine .search (query = user_messages , distance = 0.8 , limit = 100 )
74
72
75
73
logger .info (
76
74
f"Found { len (searched_objects )} matches in the database" ,
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class PackageExtractor:
69
69
(use_wildcard) @import_name)
70
70
(use_declaration
71
71
(use_as_clause (scoped_identifier) @import_name))
72
- """
72
+ """ ,
73
73
}
74
74
75
75
@staticmethod
Original file line number Diff line number Diff line change 4
4
from pathlib import Path
5
5
from unittest .mock import AsyncMock , MagicMock , patch
6
6
7
+ import httpx
7
8
import pytest
8
9
from click .testing import CliRunner
9
10
from fastapi .middleware .cors import CORSMiddleware
@@ -143,7 +144,7 @@ def test_system_routes(mock_pipeline_factory) -> None:
143
144
async def test_async_health_check (mock_pipeline_factory ) -> None :
144
145
"""Test the health check endpoint with async client."""
145
146
app = init_app (mock_pipeline_factory )
146
- async with AsyncClient (app = app , base_url = "http://test" ) as ac :
147
+ async with AsyncClient (transport = httpx . ASGITransport ( app = app ) , base_url = "http://test" ) as ac :
147
148
response = await ac .get ("/health" )
148
149
assert response .status_code == 200
149
150
assert response .json () == {"status" : "healthy" }
You can’t perform that action at this time.
0 commit comments