Change reverse url on test

This commit is contained in:
zandercymatics 2024-10-04 12:22:12 -06:00
parent 8f1ac68710
commit cfff3322bc
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 5 additions and 5 deletions

View file

@ -3157,7 +3157,7 @@ class TestDomainRequestWizard(TestWithUser, WebTest):
self.assertContains(detail_page, "usa-current", count=1) self.assertContains(detail_page, "usa-current", count=1)
# We default to the requesting entity page # We default to the requesting entity page
expected_url = reverse("domain-request:requesting_entity") expected_url = reverse("domain-request:portfolio_requesting_entity")
# This returns the entire url, thus "in" # This returns the entire url, thus "in"
self.assertIn(expected_url, detail_page.request.url) self.assertIn(expected_url, detail_page.request.url)

View file

@ -72,7 +72,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
StepEnum.ADDITIONAL_DETAILS: _("Additional details"), StepEnum.ADDITIONAL_DETAILS: _("Additional details"),
StepEnum.REQUIREMENTS: _("Requirements for operating a .gov domain"), StepEnum.REQUIREMENTS: _("Requirements for operating a .gov domain"),
StepEnum.REVIEW: _("Review and submit your domain request"), StepEnum.REVIEW: _("Review and submit your domain request"),
} } # type: ignore
# We can use a dictionary with step names and callables that return booleans # 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. # 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.TRIBAL_GOVERNMENT: lambda w: w.from_model("show_tribal_government", False),
StepEnum.ORGANIZATION_ELECTION: lambda w: w.from_model("show_organization_election", 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), StepEnum.ABOUT_YOUR_ORGANIZATION: lambda w: w.from_model("show_about_your_organization", False),
} } # type: ignore
def __init__(self): def __init__(self):
super().__init__() super().__init__()
@ -208,7 +208,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
self.StepEnum.ADDITIONAL_DETAILS: _("Additional details"), self.StepEnum.ADDITIONAL_DETAILS: _("Additional details"),
self.StepEnum.REQUIREMENTS: _("Requirements for operating a .gov domain"), self.StepEnum.REQUIREMENTS: _("Requirements for operating a .gov domain"),
self.StepEnum.REVIEW: _("Review and submit your domain request"), self.StepEnum.REVIEW: _("Review and submit your domain request"),
} } # type: ignore
self.WIZARD_CONDITIONS = {} self.WIZARD_CONDITIONS = {}
# Regenerate the steps helper # Regenerate the steps helper
@ -490,7 +490,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
def post(self, request, *args, **kwargs) -> HttpResponse: def post(self, request, *args, **kwargs) -> HttpResponse:
"""This method handles POST requests.""" """This method handles POST requests."""
if not self.is_portfolio and self.request.user.is_org_user(request): if not self.is_portfolio and self.request.user.is_org_user(request): # type: ignore
self.mark_as_portfolio_wizard() self.mark_as_portfolio_wizard()
# which button did the user press? # which button did the user press?