ran formatting command

This commit is contained in:
asaki222 2024-09-10 11:27:32 -04:00
parent f7c3579a93
commit 1203e54352
No known key found for this signature in database
GPG key ID: 2C4F802060E06EA4
6 changed files with 17 additions and 21 deletions

View file

@ -73,7 +73,6 @@ class CheckUserProfileMiddleware:
finished_setup flag on the current user. If they haven't done so,
then we redirect them to the finish setup page."""
if request.user.is_authenticated:
profile_page = self.profile_page
if request.user.verification_type == User.VerificationTypeChoices.REGULAR:

View file

@ -627,7 +627,7 @@ class FinishUserProfileTests(TestWithUser, WebTest):
self.app.set_user(incomplete_regular_user.username)
# This will redirect the user to the setup page.
# Follow implicity checks if our redirect is working.
# Follow implicity checks if our redirect is working.
finish_setup_page = self.app.get(reverse("home")).follow()
self._set_session_cookie()
@ -638,13 +638,13 @@ class FinishUserProfileTests(TestWithUser, WebTest):
self.assertEqual(finish_setup_page.status_code, 200)
# We're missing a phone number, so the page should tell us that
# We're missing a phone number, so the page should tell us that
self.assertContains(finish_setup_page, "Enter your phone number.")
# Check for the name of the save button
# Check for the name of the save button
self.assertContains(finish_setup_page, "user_setup_save_button")
# Add a phone number
# Add a phone number
finish_setup_form = finish_setup_page.form
finish_setup_form["phone"] = "(201) 555-0123"
finish_setup_form["title"] = "CEO"
@ -654,8 +654,8 @@ class FinishUserProfileTests(TestWithUser, WebTest):
self.assertEqual(save_page.status_code, 200)
self.assertContains(save_page, "Your profile has been updated.")
# Try to navigate back to the home page.
# This is the same as clicking the back button.
# Try to navigate back to the home page.
# This is the same as clicking the back button.
completed_setup_page = self.app.get(reverse("home"))
self.assertContains(completed_setup_page, "Manage your domain")
incomplete_regular_user.delete()
@ -739,7 +739,7 @@ class FinishUserProfileTests(TestWithUser, WebTest):
# Check for the name of the save button
self.assertContains(finish_setup_page, "user_setup_save_button")
# Add a phone number
# Add a phone number
finish_setup_form = finish_setup_page.form
finish_setup_form["first_name"] = "firstname"
finish_setup_form["phone"] = "(201) 555-0123"
@ -751,14 +751,14 @@ class FinishUserProfileTests(TestWithUser, WebTest):
finish_setup_form = completed_setup_page.form
# Submit the form using the specific submit button to execute the redirect
# Submit the form using the specific submit button to execute the redirect
completed_setup_page = self._submit_form_webtest(
finish_setup_form, follow=True, name="user_setup_submit_button"
)
finish_setup_form, follow=True, name="user_setup_submit_button"
)
self.assertEqual(completed_setup_page.status_code, 200)
# Assert that we are still on the
# Assert that we're on the domain request page
# Assert that we are still on the
# Assert that we're on the domain request page
self.assertNotContains(completed_setup_page, "Finish setting up your profile")
self.assertNotContains(completed_setup_page, "What contact information should we use to reach you?")
@ -836,7 +836,6 @@ class UserProfileTests(TestWithUser, WebTest):
self.assertEqual(response.status_code, 500)
self.assertContains(response, "Your profile")
@less_console_noise_decorator
def test_home_page_main_nav(self):
"""test that Your profile is in main nav of home page"""
@ -844,7 +843,6 @@ class UserProfileTests(TestWithUser, WebTest):
response = self.client.get("/", follow=True)
self.assertContains(response, "Your profile")
@less_console_noise_decorator
def test_new_request_main_nav(self):
"""test that Your profile is in main nav of new request"""

View file

@ -439,7 +439,6 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
if condition:
step_list.append(step)
step_list.remove(Step.YOUR_CONTACT)
return step_list