|
|
|
|
@@ -1267,7 +1267,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
prereg_realm = PreregistrationRealm.objects.get(email=email)
|
|
|
|
|
self.assertEqual(prereg_realm.name, "Zulip Test")
|
|
|
|
|
self.assertEqual(prereg_realm.org_type, Realm.ORG_TYPES["business"]["id"])
|
|
|
|
|
@@ -1404,7 +1404,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -1450,7 +1450,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -1499,7 +1499,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -1559,7 +1559,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -1604,7 +1604,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -1653,7 +1653,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -1703,7 +1703,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
result = self.client_get(confirmation_url)
|
|
|
|
|
@@ -1759,7 +1759,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
first_confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
self.assertEqual(PreregistrationRealm.objects.filter(email=email, status=0).count(), 1)
|
|
|
|
|
|
|
|
|
|
@@ -1773,7 +1773,7 @@ class RealmCreationTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
second_confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
|
|
|
|
|
self.assertNotEqual(first_confirmation_url, second_confirmation_url)
|
|
|
|
|
@@ -2041,7 +2041,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"], **client_kwargs)
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -2124,7 +2124,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -2159,7 +2159,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -2197,7 +2197,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -2230,7 +2230,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -2335,7 +2335,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
from django.core.mail import outbox
|
|
|
|
|
|
|
|
|
|
@@ -2357,7 +2357,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -2393,7 +2393,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -2676,7 +2676,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
confirmation_url = self.get_confirmation_url_from_outbox(email)
|
|
|
|
|
@@ -2860,7 +2860,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
from django.core.mail import outbox
|
|
|
|
|
|
|
|
|
|
@@ -2948,7 +2948,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
from django.core.mail import outbox
|
|
|
|
|
|
|
|
|
|
@@ -3032,7 +3032,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
with self.settings(
|
|
|
|
|
POPULATE_PROFILE_VIA_LDAP=True,
|
|
|
|
|
@@ -3109,7 +3109,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
with self.settings(
|
|
|
|
|
POPULATE_PROFILE_VIA_LDAP=True,
|
|
|
|
|
@@ -3185,7 +3185,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
with self.settings(
|
|
|
|
|
POPULATE_PROFILE_VIA_LDAP=True,
|
|
|
|
|
@@ -3335,7 +3335,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
with self.settings(
|
|
|
|
|
POPULATE_PROFILE_VIA_LDAP=True,
|
|
|
|
|
@@ -3390,7 +3390,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
# If the user's email is inside the LDAP directory and we just
|
|
|
|
|
# have a wrong password, then we refuse to create an account
|
|
|
|
|
@@ -3516,7 +3516,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
with self.settings(
|
|
|
|
|
POPULATE_PROFILE_VIA_LDAP=True,
|
|
|
|
|
@@ -3561,7 +3561,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
with self.settings(
|
|
|
|
|
POPULATE_PROFILE_VIA_LDAP=True,
|
|
|
|
|
LDAP_EMAIL_ATTR="mail",
|
|
|
|
|
@@ -3722,7 +3722,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
|
|
|
|
|
with patch("zerver.views.registration.name_changes_disabled", return_value=True):
|
|
|
|
|
result = self.submit_reg_form_for_user(
|
|
|
|
|
@@ -3755,7 +3755,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"])
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
from django.core.mail import outbox
|
|
|
|
|
|
|
|
|
|
@@ -3821,7 +3821,7 @@ class UserSignUpTest(ZulipTestCase):
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
result = self.client_get(result["Location"], subdomain="zephyr")
|
|
|
|
|
self.assert_in_response("Check your email", result)
|
|
|
|
|
self.assert_in_response("check your email", result)
|
|
|
|
|
# Visit the confirmation link.
|
|
|
|
|
from django.core.mail import outbox
|
|
|
|
|
|
|
|
|
|
|