Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Roadmaster/c753f7bac276b4fc2065f807001f9c2b to your computer and use it in GitHub Desktop.
Save Roadmaster/c753f7bac276b4fc2065f807001f9c2b to your computer and use it in GitHub Desktop.
#!/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