From 11f8081c5bbd4f17e19dd0c636708c2015f292d2 Mon Sep 17 00:00:00 2001 From: Rebecca Hsieh Date: Fri, 26 Apr 2024 13:14:11 -0700 Subject: [PATCH] Address feedback --- .../commands/populate_domain_updated_federal_agency.py | 6 +++--- src/registrar/tests/test_management_scripts.py | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/registrar/management/commands/populate_domain_updated_federal_agency.py b/src/registrar/management/commands/populate_domain_updated_federal_agency.py index 176849413..5443d3411 100644 --- a/src/registrar/management/commands/populate_domain_updated_federal_agency.py +++ b/src/registrar/management/commands/populate_domain_updated_federal_agency.py @@ -41,7 +41,7 @@ class Command(BaseCommand): Renames the Federal Agency to the correct new naming for both Domain Information and Domain Requests objects. - NOTE: If it's NULL for a domain request, we skip it as + NOTE: If it's None for a domain request, we skip it as a user most likely hasn't gotten to it yet. """ logger.info("Transferring federal agencies to FederalAgency object") @@ -65,7 +65,7 @@ class Command(BaseCommand): domain_info.updated_federal_agency = federal_agency_row domain_infos_to_update.append(domain_info) logger.info( - f"DomainInformation {domain_info} updated_federal_agency set to:" + f"DomainInformation {domain_info} => updated_federal_agency set to:" f"{domain_info.updated_federal_agency}" ) except Exception as err: @@ -83,7 +83,7 @@ class Command(BaseCommand): domain_request.updated_federal_agency = federal_agency_row domain_requests_to_update.append(domain_request) logger.info( - f"DomainRequest {domain_request} updated_federal_agency set to:" + f"DomainRequest {domain_request} => updated_federal_agency set to:" f"{domain_request.updated_federal_agency}" ) except Exception as err: diff --git a/src/registrar/tests/test_management_scripts.py b/src/registrar/tests/test_management_scripts.py index 746c4f8ab..1bb6c59b7 100644 --- a/src/registrar/tests/test_management_scripts.py +++ b/src/registrar/tests/test_management_scripts.py @@ -746,7 +746,7 @@ class TestDiscloseEmails(MockEppLib): # TODO in #1793: Remove this whole test class -class TestRenamingFederalAgency(TestCase): +class TestPopulateDomainUpdatedFederalAgency(TestCase): def setUp(self): super().setUp() @@ -802,11 +802,7 @@ class TestRenamingFederalAgency(TestCase): execute the populate_domain_updated_federal_agency command. """ with less_console_noise(): - with patch( - "registrar.management.commands.utility.terminal_helper.TerminalHelper.query_yes_no_exit", # noqa - return_value=True, - ): - call_command("populate_domain_updated_federal_agency") + call_command("populate_domain_updated_federal_agency") def test_domain_information_renaming_federal_agency_success(self): """