chore: 统一代码格式 - black + prettier 全量格式化
CI/CD Pipeline / Frontend Lint (push) Failing after 75h41m6s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 75h41m16s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1734h15m39s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1734h15m41s
CI/CD Pipeline / Build Production Runtime Images (push) Failing after 1734h15m43s
CI/CD Pipeline / Deploy Staging (push) Failing after 1734h15m43s
CI/CD Pipeline / Deploy Production (push) Failing after 1734h47m8s

This commit is contained in:
DevOps Bot
2026-07-06 09:12:54 +08:00
parent 2d05f37651
commit b86a9c2af2
35 changed files with 467 additions and 209 deletions
+3 -9
View File
@@ -38,12 +38,8 @@ from app.auth import AuthenticatedUser, get_current_user
from app.dependencies import get_user_repository
# ── 导入被测路由模块(从 fixtures 加载简化版路由) ─────────────────────────────
_fixture_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "fixtures", "subscription_routes.py"
)
_spec = importlib.util.spec_from_file_location(
"app.api.routes.subscription", _fixture_path
)
_fixture_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures", "subscription_routes.py")
_spec = importlib.util.spec_from_file_location("app.api.routes.subscription", _fixture_path)
subscription = importlib.util.module_from_spec(_spec)
sys.modules["app.api.routes.subscription"] = subscription
_spec.loader.exec_module(subscription)
@@ -376,9 +372,7 @@ class TestCancelSubscription:
)
app = FastAPI()
app.include_router(subscription.router)
app.dependency_overrides[subscription.get_current_user] = lambda: AuthenticatedUser(
user=original_user
)
app.dependency_overrides[subscription.get_current_user] = lambda: AuthenticatedUser(user=original_user)
app.dependency_overrides[subscription.get_user_repository] = lambda: mock_user_repo
tc = TestClient(app)