mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-28 21:46:33 +02:00
lint
This commit is contained in:
parent
cfff3322bc
commit
c6f50f0af2
2 changed files with 6 additions and 5 deletions
|
@ -2788,7 +2788,8 @@ class DomainRequestTests(TestWithUser, WebTest):
|
||||||
|
|
||||||
def test_non_creator_access(self):
|
def test_non_creator_access(self):
|
||||||
"""Tests that a user cannot edit a domain request they didn't create"""
|
"""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)
|
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)
|
edit_page = self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}), expect_errors=True)
|
||||||
|
|
|
@ -43,7 +43,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
although not without consulting the base implementation, first.
|
although not without consulting the base implementation, first.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
StepEnum: Step | PortfolioDomainRequestStep = Step # type: ignore
|
StepEnum = Step # type: ignore
|
||||||
template_name = ""
|
template_name = ""
|
||||||
|
|
||||||
is_portfolio = False
|
is_portfolio = False
|
||||||
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue