From 92c85dbb16b621fd20010e8ab8c4daee87970f31 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 26 Feb 2024 15:10:03 -0700 Subject: [PATCH] Linting --- src/registrar/tests/test_models.py | 11 ++--------- src/registrar/utility/errors.py | 4 +--- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/registrar/tests/test_models.py b/src/registrar/tests/test_models.py index 8e9b9dc4e..73d86dfd7 100644 --- a/src/registrar/tests/test_models.py +++ b/src/registrar/tests/test_models.py @@ -52,7 +52,7 @@ class TestDomainApplication(TestCase): 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.started_application, self.submitted_application, @@ -181,14 +181,7 @@ class TestDomainApplication(TestCase): with less_console_noise(): # Perform the specified action action_method = getattr(application, action) - if action == "approve" and not application.investigator: - 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() + action_method() # Check if an email was sent sent_emails = [ diff --git a/src/registrar/utility/errors.py b/src/registrar/utility/errors.py index f399299ff..10e1809aa 100644 --- a/src/registrar/utility/errors.py +++ b/src/registrar/utility/errors.py @@ -100,9 +100,7 @@ class ApplicationStatusError(Exception): FSMErrorCodes.APPROVE_DOMAIN_IN_USE: ("Cannot approve. Requested domain is already in use."), FSMErrorCodes.NO_INVESTIGATOR: ("No investigator was assigned."), FSMErrorCodes.INVESTIGATOR_NOT_STAFF: ("Investigator is not a staff user."), - FSMErrorCodes.INVESTIGATOR_NOT_SUBMITTER: ( - "Only the assigned investigator can make this change." - ), + FSMErrorCodes.INVESTIGATOR_NOT_SUBMITTER: ("Only the assigned investigator can make this change."), } def __init__(self, *args, code=None, **kwargs):