Skip to content

Commit

Permalink
Split out super and admin booleans.
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch committed Oct 25, 2023
1 parent 6bfad90 commit 1d138e4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions integration_tests/setup_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def _add_app_user(
hashed_pass: str = "",
is_active: bool = True,
is_super: bool = False,
is_admin: bool = False,
):
test_db.add(
AppUser(
Expand All @@ -225,7 +226,7 @@ def _add_app_user(
organisation_id=org_id,
job_title="",
is_active=is_active,
is_admin=is_super,
is_admin=is_admin,
)
)
test_db.commit()
Expand Down Expand Up @@ -261,9 +262,7 @@ def _setup_organisation(test_db: Session) -> int:
test_db, "[email protected]", "TestHashedPassEmpty", org.id, hashed_pass=""
)
_add_app_user(test_db, "[email protected]", "TestPassMismatch", org.id, hashed_pass="")
_add_app_user(
test_db, "[email protected]", "Admin", org.id, hashed_pass="", is_super=True
)
_add_app_user(test_db, "[email protected]", "Admin", org.id, hashed_pass="")

return cast(int, org.id)

Expand Down

0 comments on commit 1d138e4

Please sign in to comment.