test_signup: Refactor test_signup_without_full_name to use verify_signup.

The test now uses submit_reg_form_for_user, meaning a blank
full_name is posted to /accounts/register/ rather than the
parameter being excluded.

Fixes part of #7564
This commit is contained in:
Gilbert Bishop-White 2021-06-24 19:00:23 +01:00 committed by Tim Abbott
parent 330d1385d9
commit 28932ba8ee
1 changed files with 1 additions and 21 deletions

View File

@ -3793,27 +3793,7 @@ class UserSignUpTest(InviteUserBase):
"""
email = "newguy@zulip.com"
password = "newpassword"
result = self.client_post("/accounts/home/", {"email": email})
self.assertEqual(result.status_code, 302)
self.assertTrue(result["Location"].endswith(f"/accounts/send_confirm/{email}"))
result = self.client_get(result["Location"])
self.assert_in_response("Check your email so we can get started.", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
result = self.client_get(confirmation_url)
self.assertEqual(result.status_code, 200)
result = self.client_post(
"/accounts/register/",
{
"password": password,
"key": find_key_by_email(email),
"terms": True,
"from_confirmation": "1",
},
)
result = self.verify_signup(email=email, password=password, full_name="")
self.assert_in_success_response(["We just need you to do one last thing."], result)
# Verify that the user is asked for name and password