mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init unit-testing
This commit is contained in:
parent
0a2c5526bc
commit
1c86a829b0
6 changed files with 112 additions and 3 deletions
|
|
@ -93,7 +93,7 @@ async def update_install_instance(
|
|||
|
||||
|
||||
# Install Default roles
|
||||
async def install_default_elements(request: Request, data: dict, db_session: Session):
|
||||
async def install_default_elements( data: dict, db_session: Session):
|
||||
# remove all default roles
|
||||
statement = select(Role).where(Role.role_type == RoleTypeEnum.TYPE_GLOBAL)
|
||||
roles = db_session.exec(statement).all()
|
||||
|
|
@ -279,7 +279,7 @@ async def install_default_elements(request: Request, data: dict, db_session: Ses
|
|||
|
||||
# Organization creation
|
||||
async def install_create_organization(
|
||||
request: Request, org_object: OrganizationCreate, db_session: Session
|
||||
org_object: OrganizationCreate, db_session: Session
|
||||
):
|
||||
org = Organization.from_orm(org_object)
|
||||
|
||||
|
|
@ -296,7 +296,7 @@ async def install_create_organization(
|
|||
|
||||
|
||||
async def install_create_organization_user(
|
||||
request: Request, user_object: UserCreate, org_slug: str, db_session: Session
|
||||
user_object: UserCreate, org_slug: str, db_session: Session
|
||||
):
|
||||
user = User.from_orm(user_object)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue