Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

do_create_realm: Require passing kwargs by name.

Tim Abbotte42354c91743
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py
index 02297580fed..1f2efada2e1 100644
--- a/zerver/lib/actions.py
+++ b/zerver/lib/actions.py
@@ -4385,6 +4385,7 @@ def do_change_stream_message_retention_days(
def do_create_realm(
string_id: str,
name: str,
+ *,
emails_restricted_to_domains: Optional[bool] = None,
date_created: Optional[datetime.datetime] = None,
) -> Realm:
diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py
index bd6a07a821c..79bdf7dab91 100644
--- a/zerver/tests/test_auth_backends.py
+++ b/zerver/tests/test_auth_backends.py
@@ -5348,7 +5348,7 @@ class TestZulipLDAPUserPopulator(ZulipLDAPTestCase):
)
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")
email = hamlet.delivery_email
hamlet2 = do_create_user(email, None, test_realm, hamlet.full_name, acting_user=None)
diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py
index f6b580d52cb..f1e49fa3578 100644
--- a/zerver/tests/test_signup.py
+++ b/zerver/tests/test_signup.py
@@ -3974,7 +3974,7 @@ class UserSignUpTest(InviteUserBase):
ldap_user_attr_map = {
"full_name": "cn",
}
- do_create_realm("test", "test", False)
+ do_create_realm("test", "test", emails_restricted_to_domains=False)
with self.settings(
POPULATE_PROFILE_VIA_LDAP=True,