Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tests: Extract realm name and string_id values in variables.
Sahil Batraf8f4fa4c5e1f
diff --git a/zerver/tests/test_management_commands.py b/zerver/tests/test_management_commands.pyindex c759cc3b3ae..abfa251e84a 100644--- a/zerver/tests/test_management_commands.py+++ b/zerver/tests/test_management_commands.py@@ -323,15 +323,17 @@ class TestGenerateRealmCreationLink(ZulipTestCase):@override_settings(OPEN_REALM_CREATION=False)def test_generate_link_confirm_email(self) -> None:email = "[email protected]"+ realm_name = "Zulip test"+ string_id = "zuliptest"generated_link = generate_realm_creation_url(by_admin=False)result = self.client_post(generated_link,{"email": email,- "realm_name": "Zulip test",+ "realm_name": realm_name,"realm_type": Realm.ORG_TYPES["business"]["id"],- "realm_subdomain": "zuliptest",+ "realm_subdomain": string_id,},)self.assertEqual(result.status_code, 302)diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.pyindex 56bb6d56ff0..2b5abb28dd5 100644--- a/zerver/tests/test_signup.py+++ b/zerver/tests/test_signup.py@@ -1543,7 +1543,7 @@ class RealmCreationTest(ZulipTestCase):password = "test"string_id = "zuliptest"email = "[email protected]"- realm_name = "Test"+ realm_name = "Zulip test"# Make sure the realm does not existwith self.assertRaises(Realm.DoesNotExist):@@ -1551,7 +1551,7 @@ class RealmCreationTest(ZulipTestCase):# Create new realm with the emailresult = self.submit_realm_creation_form(- email, realm_subdomain=string_id, realm_name="Zulip test"+ email, realm_subdomain=string_id, realm_name=realm_name)self.assertEqual(result.status_code, 302)self.assertTrue(