统一项目角色与接口权限配置
This commit is contained in:
@@ -157,7 +157,7 @@ async def test_list_templates_filter_by_type(db_session, user_id):
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_list_templates_excludes_qa_system_preset(db_session):
|
||||
async def test_list_templates_includes_qa_system_preset(db_session):
|
||||
qa_template = PermissionTemplate(
|
||||
name="质量保证",
|
||||
template_type=TemplateType.ROLE,
|
||||
@@ -178,7 +178,7 @@ async def test_list_templates_excludes_qa_system_preset(db_session):
|
||||
role_templates = await PermissionTemplateService.list_templates(db_session, template_type=TemplateType.ROLE)
|
||||
|
||||
assert "PM" in {template.category for template in role_templates}
|
||||
assert "QA" not in {template.category for template in role_templates if template.is_system}
|
||||
assert "QA" in {template.category for template in role_templates if template.is_system}
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user