Linting / fix unit test passing in debug

This commit is contained in:
zandercymatics 2024-04-16 15:32:33 -06:00
parent 582f35bc07
commit 50ede03476
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 4 additions and 7 deletions

View file

@ -118,10 +118,7 @@ class Command(BaseCommand):
try:
if request.generic_org_type is not None:
domain_name = None
if (
request.requested_domain is not None and
request.requested_domain.name is not None
):
if request.requested_domain is not None and request.requested_domain.name is not None:
domain_name = request.requested_domain.name
request_is_approved = request.state == DomainRequest.DomainRequestStatus.APPROVED
@ -195,7 +192,7 @@ class Command(BaseCommand):
ScriptDataHelper.bulk_update_fields(
DomainInformation, self.di_to_update, ["organization_type", "is_election_board", "generic_org_type"]
)
# Log what happened
log_header = "============= FINISHED UPDATE FOR DOMAININFORMATION ==============="
TerminalHelper.log_script_run_summary(

View file

@ -98,7 +98,7 @@ class TestPopulateOrganizationType(MockEppLib):
"registrar.management.commands.utility.terminal_helper.TerminalHelper.query_yes_no_exit", # noqa
return_value=True,
):
call_command("populate_organization_type", "registrar/tests/data/fake_election_domains.csv", debug=True)
call_command("populate_organization_type", "registrar/tests/data/fake_election_domains.csv")
def assert_expected_org_values_on_request_and_info(
self,
@ -118,7 +118,7 @@ class TestPopulateOrganizationType(MockEppLib):
expected_values (dict): Container for what we expect is_electionboard, generic_org_type,
and organization_type to be on DomainRequest and DomainInformation.
Example:
Example:
expected_values = {
"is_election_board": False,
"generic_org_type": DomainRequest.OrganizationChoices.CITY,