From 28932ba8eeff7c2867caae7064ff154f4fe35c8f Mon Sep 17 00:00:00 2001 From: Gilbert Bishop-White Date: Thu, 24 Jun 2021 19:00:23 +0100 Subject: [PATCH] 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 --- zerver/tests/test_signup.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py index 8b138acbf2..407f0252f2 100644 --- a/zerver/tests/test_signup.py +++ b/zerver/tests/test_signup.py @@ -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