diff --git a/src/registrar/tests/test_views_request.py b/src/registrar/tests/test_views_request.py index d1aec7b7b..197667e2a 100644 --- a/src/registrar/tests/test_views_request.py +++ b/src/registrar/tests/test_views_request.py @@ -2788,7 +2788,8 @@ class DomainRequestTests(TestWithUser, WebTest): def test_non_creator_access(self): """Tests that a user cannot edit a domain request they didn't create""" - other_user = User.objects.create_user(username="other_user", password="password") + p = "password" + other_user = User.objects.create_user(username="other_user", password=p) domain_request = completed_domain_request(user=other_user) edit_page = self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}), expect_errors=True) diff --git a/src/registrar/views/domain_request.py b/src/registrar/views/domain_request.py index d0f8d09b2..4e899d507 100644 --- a/src/registrar/views/domain_request.py +++ b/src/registrar/views/domain_request.py @@ -43,7 +43,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): although not without consulting the base implementation, first. """ - StepEnum: Step | PortfolioDomainRequestStep = Step # type: ignore + StepEnum = Step # type: ignore template_name = "" is_portfolio = False @@ -72,7 +72,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): StepEnum.ADDITIONAL_DETAILS: _("Additional details"), StepEnum.REQUIREMENTS: _("Requirements for operating a .gov domain"), StepEnum.REVIEW: _("Review and submit your domain request"), - } # type: ignore + } # We can use a dictionary with step names and callables that return booleans # to show or hide particular steps based on the state of the process. @@ -81,7 +81,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): StepEnum.TRIBAL_GOVERNMENT: lambda w: w.from_model("show_tribal_government", False), StepEnum.ORGANIZATION_ELECTION: lambda w: w.from_model("show_organization_election", False), StepEnum.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model("show_about_your_organization", False), - } # type: ignore + } def __init__(self): super().__init__() @@ -208,7 +208,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): self.StepEnum.ADDITIONAL_DETAILS: _("Additional details"), self.StepEnum.REQUIREMENTS: _("Requirements for operating a .gov domain"), self.StepEnum.REVIEW: _("Review and submit your domain request"), - } # type: ignore + } self.WIZARD_CONDITIONS = {} # Regenerate the steps helper