mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
tests: Extract realm name and string_id values in variables.
This is a prep commit so that we can use these variables to verify the urls in next commit.
This commit is contained in:
@@ -323,15 +323,17 @@ class TestGenerateRealmCreationLink(ZulipTestCase):
|
||||
@override_settings(OPEN_REALM_CREATION=False)
|
||||
def test_generate_link_confirm_email(self) -> None:
|
||||
email = "user1@test.com"
|
||||
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)
|
||||
|
||||
@@ -1543,7 +1543,7 @@ class RealmCreationTest(ZulipTestCase):
|
||||
password = "test"
|
||||
string_id = "zuliptest"
|
||||
email = "user1@test.com"
|
||||
realm_name = "Test"
|
||||
realm_name = "Zulip test"
|
||||
|
||||
# Make sure the realm does not exist
|
||||
with self.assertRaises(Realm.DoesNotExist):
|
||||
@@ -1551,7 +1551,7 @@ class RealmCreationTest(ZulipTestCase):
|
||||
|
||||
# Create new realm with the email
|
||||
result = 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(
|
||||
|
||||
Reference in New Issue
Block a user