Update tests for teams API
This commit is contained in:
parent
eeadeb9383
commit
b683088f87
4 changed files with 85 additions and 19 deletions
12
initdb.py
12
initdb.py
|
@ -657,6 +657,9 @@ def populate_database(minimal=False, with_storage=False):
|
|||
liborg = model.organization.create_organization('library', 'quay+library@devtable.com', new_user_1)
|
||||
liborg.save()
|
||||
|
||||
thirdorg = model.organization.create_organization('sellnsmall', 'quay+sell@devtable.com', new_user_1)
|
||||
thirdorg.save()
|
||||
|
||||
model.user.create_robot('coolrobot', org)
|
||||
|
||||
oauth_app_1 = model.oauth.create_application(org, 'Some Test App', 'http://localhost:8000',
|
||||
|
@ -700,9 +703,18 @@ def populate_database(minimal=False, with_storage=False):
|
|||
model.team.add_user_to_team(creatorbot, creators)
|
||||
model.team.add_user_to_team(creatoruser, creators)
|
||||
|
||||
sell_owners = model.team.get_organization_team('sellnsmall', 'owners')
|
||||
sell_owners.description = 'Owners have unfettered access across the entire org.'
|
||||
sell_owners.save()
|
||||
|
||||
model.team.add_user_to_team(new_user_4, sell_owners)
|
||||
|
||||
synced_team = model.team.create_team('synced', org, 'member', 'Some synced team.')
|
||||
model.team.set_team_syncing(synced_team, 'ldap', {'group_dn': 'cn=Test-Group,ou=Users'})
|
||||
|
||||
another_synced_team = model.team.create_team('synced', thirdorg, 'member', 'Some synced team.')
|
||||
model.team.set_team_syncing(another_synced_team, 'ldap', {'group_dn': 'cn=Test-Group,ou=Users'})
|
||||
|
||||
__generate_repository(with_storage, new_user_1, 'superwide', None, False, [],
|
||||
[(10, [], 'latest2'),
|
||||
(2, [], 'latest3'),
|
||||
|
|
Reference in a new issue