forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
112 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from galaxy.model.security import GalaxyRBACAgent | ||
|
||
|
||
def test_set_group_user_and_role_associations(make_user, make_role, make_group): | ||
users = [make_user() for _ in range(3)] | ||
roles = [make_role() for _ in range(3)] | ||
|
||
user_ids = [users[0].id, users[1].id] # first and second user | ||
role_ids = [role.id for role in roles] # all roles | ||
|
||
group = make_group() | ||
assert len(group.users) == 0 | ||
assert len(group.roles) == 0 | ||
|
||
db.group.set_group_user_and_role_associations(group, user_ids=user_ids, role_ids=role_ids) | ||
|
||
assert len(group.users) == 2 | ||
assert len(group.roles) == 3 | ||
# also verify ids | ||
|
||
|