feat(shop-role): 实现店铺角色继承功能和权限检查优化
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m39s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m39s
- 新增店铺角色管理 API 和数据模型 - 实现角色继承和权限检查逻辑 - 添加流程测试框架和集成测试 - 更新权限服务和账号管理逻辑 - 添加数据库迁移脚本 - 归档 OpenSpec 变更文档 Ultraworked with Sisyphus
This commit is contained in:
38
flow_tests/fixtures/common.py
Normal file
38
flow_tests/fixtures/common.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import pytest
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
from core.client import APIClient
|
||||
from core.auth import AuthManager
|
||||
from core.database import Database
|
||||
from core.cleanup import CleanupTracker
|
||||
from core.mock import MockService
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def client():
|
||||
return APIClient()
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def auth(client):
|
||||
return AuthManager(client)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def db():
|
||||
return Database()
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def tracker(db):
|
||||
t = CleanupTracker(db)
|
||||
yield t
|
||||
t.cleanup()
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def mock(db):
|
||||
return MockService(db)
|
||||
Reference in New Issue
Block a user