do_create_realm: Require passing kwargs by name.

This commit is contained in:
Tim Abbott 2021-03-10 11:54:27 -08:00
parent d91d3a05b9
commit e42354c917
3 changed files with 3 additions and 2 deletions

View File

@ -4385,6 +4385,7 @@ def do_change_stream_message_retention_days(
def do_create_realm( def do_create_realm(
string_id: str, string_id: str,
name: str, name: str,
*,
emails_restricted_to_domains: Optional[bool] = None, emails_restricted_to_domains: Optional[bool] = None,
date_created: Optional[datetime.datetime] = None, date_created: Optional[datetime.datetime] = None,
) -> Realm: ) -> Realm:

View File

@ -5348,7 +5348,7 @@ class TestZulipLDAPUserPopulator(ZulipLDAPTestCase):
) )
def test_user_in_multiple_realms(self) -> None: def test_user_in_multiple_realms(self) -> None:
test_realm = do_create_realm("test", "test", False) test_realm = do_create_realm("test", "test", emails_restricted_to_domains=False)
hamlet = self.example_user("hamlet") hamlet = self.example_user("hamlet")
email = hamlet.delivery_email email = hamlet.delivery_email
hamlet2 = do_create_user(email, None, test_realm, hamlet.full_name, acting_user=None) hamlet2 = do_create_user(email, None, test_realm, hamlet.full_name, acting_user=None)

View File

@ -3974,7 +3974,7 @@ class UserSignUpTest(InviteUserBase):
ldap_user_attr_map = { ldap_user_attr_map = {
"full_name": "cn", "full_name": "cn",
} }
do_create_realm("test", "test", False) do_create_realm("test", "test", emails_restricted_to_domains=False)
with self.settings( with self.settings(
POPULATE_PROFILE_VIA_LDAP=True, POPULATE_PROFILE_VIA_LDAP=True,