mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +02:00
Linting
This commit is contained in:
parent
3d6f638462
commit
92c85dbb16
2 changed files with 3 additions and 12 deletions
|
@ -52,7 +52,7 @@ class TestDomainApplication(TestCase):
|
||||||
status=DomainApplication.ApplicationStatus.INELIGIBLE, name="ineligible.gov"
|
status=DomainApplication.ApplicationStatus.INELIGIBLE, name="ineligible.gov"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Store all aplpication statuses in a variable for ease of use
|
# Store all application statuses in a variable for ease of use
|
||||||
self.all_applications = [
|
self.all_applications = [
|
||||||
self.started_application,
|
self.started_application,
|
||||||
self.submitted_application,
|
self.submitted_application,
|
||||||
|
@ -181,14 +181,7 @@ class TestDomainApplication(TestCase):
|
||||||
with less_console_noise():
|
with less_console_noise():
|
||||||
# Perform the specified action
|
# Perform the specified action
|
||||||
action_method = getattr(application, action)
|
action_method = getattr(application, action)
|
||||||
if action == "approve" and not application.investigator:
|
action_method()
|
||||||
user, _ = User.objects.get_or_create(username="testwafflesyrup", is_staff=True)
|
|
||||||
application.investigator = user
|
|
||||||
application.save()
|
|
||||||
application.refresh_from_db()
|
|
||||||
action_method()
|
|
||||||
else:
|
|
||||||
action_method()
|
|
||||||
|
|
||||||
# Check if an email was sent
|
# Check if an email was sent
|
||||||
sent_emails = [
|
sent_emails = [
|
||||||
|
|
|
@ -100,9 +100,7 @@ class ApplicationStatusError(Exception):
|
||||||
FSMErrorCodes.APPROVE_DOMAIN_IN_USE: ("Cannot approve. Requested domain is already in use."),
|
FSMErrorCodes.APPROVE_DOMAIN_IN_USE: ("Cannot approve. Requested domain is already in use."),
|
||||||
FSMErrorCodes.NO_INVESTIGATOR: ("No investigator was assigned."),
|
FSMErrorCodes.NO_INVESTIGATOR: ("No investigator was assigned."),
|
||||||
FSMErrorCodes.INVESTIGATOR_NOT_STAFF: ("Investigator is not a staff user."),
|
FSMErrorCodes.INVESTIGATOR_NOT_STAFF: ("Investigator is not a staff user."),
|
||||||
FSMErrorCodes.INVESTIGATOR_NOT_SUBMITTER: (
|
FSMErrorCodes.INVESTIGATOR_NOT_SUBMITTER: ("Only the assigned investigator can make this change."),
|
||||||
"Only the assigned investigator can make this change."
|
|
||||||
),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, *args, code=None, **kwargs):
|
def __init__(self, *args, code=None, **kwargs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue