From a753f49e6ac80ad0505556620dee73b783d4c3eb Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 27 Nov 2017 17:42:11 -0800 Subject: [PATCH] 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. --- zilencer/management/commands/populate_db.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.py index 0299bd10e9..e33de3e4a7 100644 --- a/zilencer/management/commands/populate_db.py +++ b/zilencer/management/commands/populate_db.py @@ -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)