Created
June 21, 2021 15:20
-
-
Save Roadmaster/c753f7bac276b4fc2065f807001f9c2b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python3 | |
# Adds an existing account to Person/LP teams (creates the teams as well) | |
# Mainly for SAML testing | |
from identityprovider.tests.factory import SSOObjectFactory | |
from identityprovider.models import Account | |
teams = ("footeam", "barteam", "bazteam") | |
theaccount = Account.objects.get(displayname='foomaster') | |
fac = SSOObjectFactory() | |
for team in teams: | |
tm = fac.make_team(team) | |
fac.add_account_to_team(theaccount, tm) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment