MCPcopy
hub / github.com/learnhouse/learnhouse / user_role

Function user_role

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

Regular user role (id=4) with read-only permissions.

(db, org)

Source from the content-addressed store, hash-verified

234
235@pytest.fixture
236async def user_role(db, org):
237 """Regular user role (id=4) with read-only permissions."""
238 r = Role(
239 id=4,
240 name="User",
241 org_id=org.id,
242 role_type=RoleTypeEnum.TYPE_ORGANIZATION,
243 role_uuid="role_user",
244 rights=USER_RIGHTS.model_dump(),
245 creation_date=str(datetime.now()),
246 update_date=str(datetime.now()),
247 )
248 db.add(r)
249 await db.commit()
250 await db.refresh(r)
251 return r
252
253
254# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

RoleClass · 0.90
commitMethod · 0.80
model_dumpMethod · 0.45

Tested by

no test coverage detected