populate_db: Add a "lear" realm for testing cross-realm email sharing.

We don't yet actually allow sharing emails across realms, but we
will soon.  This lets us start testing some pieces of those changes.
This commit is contained in:
Greg Price 2017-11-27 17:42:11 -08:00
parent 5f38b374b6
commit a753f49e6a
1 changed files with 9 additions and 0 deletions

View File

@ -133,6 +133,10 @@ class Command(BaseCommand):
invite_required=False, org_type=Realm.CORPORATE)
RealmDomain.objects.create(realm=mit_realm, domain="mit.edu")
lear_realm = Realm.objects.create(
string_id="lear", name="Lear & Co.", restricted_to_domain=False,
invite_required=False, org_type=Realm.CORPORATE)
# Create test Users (UserProfiles are automatically created,
# as are subscriptions to the ability to receive personals).
names = [
@ -307,6 +311,11 @@ class Command(BaseCommand):
]
create_users(mit_realm, testsuite_mit_users)
testsuite_lear_users = [
("King Lear", "king@lear.org"),
]
create_users(lear_realm, testsuite_lear_users)
if not options["test_suite"]:
# Initialize the email gateway bot as an API Super User
email_gateway_bot = get_system_bot(settings.EMAIL_GATEWAY_BOT)