Admin role (id=1) with full permissions.
(db, org)
| 215 | |
| 216 | @pytest.fixture |
| 217 | async 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 |
nothing calls this directly
no test coverage detected