test: tighten phase 1 coverage contracts

This commit is contained in:
huanghuoguoguo
2026-05-16 10:30:17 +08:00
parent 3ba727f0e4
commit bb55cd7ba9
44 changed files with 708 additions and 1164 deletions
@@ -47,7 +47,7 @@ class TestExecuteAsync:
mgr.db = mock_db
# Execute a simple select
result = await mgr.execute_async(sqlalchemy.select(1))
await mgr.execute_async(sqlalchemy.select(1))
mock_conn.execute.assert_called_once()
mock_conn.commit.assert_called_once()
@@ -8,6 +8,8 @@ Tests cover:
from __future__ import annotations
import datetime
from unittest.mock import Mock
from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy.orm import declarative_base
from importlib import import_module
@@ -124,7 +126,3 @@ class TestSerializeModel:
assert 'id' not in result
assert 'name' not in result
assert 'created_at' in result
# Import Mock for type annotations
from unittest.mock import Mock