MCPcopy
hub / github.com/learnhouse/learnhouse / admin_role

Function admin_role

apps/api/src/tests/conftest.py:217–232  ·  view source on GitHub ↗

Admin role (id=1) with full permissions.

(db, org)

Source from the content-addressed store, hash-verified

215
216@pytest.fixture
217async def admin_role(db, org):
218 """Admin role (id=1) with full permissions."""
219 r = Role(
220 id=1,
221 name="Admin",
222 org_id=org.id,
223 role_type=RoleTypeEnum.TYPE_ORGANIZATION,
224 role_uuid="role_admin",
225 rights=ADMIN_RIGHTS.model_dump(),
226 creation_date=str(datetime.now()),
227 update_date=str(datetime.now()),
228 )
229 db.add(r)
230 await db.commit()
231 await db.refresh(r)
232 return r
233
234
235@pytest.fixture

Callers

nothing calls this directly

Calls 3

RoleClass · 0.90
commitMethod · 0.80
model_dumpMethod · 0.45

Tested by

no test coverage detected