diff --git a/src/registrar/management/commands/master_domain_migrations.py b/src/registrar/management/commands/master_domain_migrations.py index 277b49a94..1b0623b35 100644 --- a/src/registrar/management/commands/master_domain_migrations.py +++ b/src/registrar/management/commands/master_domain_migrations.py @@ -296,7 +296,7 @@ class Command(BaseCommand): # TODO: make this somehow run inside TerminalHelper prompt call_command( command_script, - s=True + send_emails=True ) def run_migration_scripts(self, diff --git a/src/registrar/management/commands/utility/terminal_helper.py b/src/registrar/management/commands/utility/terminal_helper.py index e59586816..d56ca47f1 100644 --- a/src/registrar/management/commands/utility/terminal_helper.py +++ b/src/registrar/management/commands/utility/terminal_helper.py @@ -61,15 +61,6 @@ class TerminalHelper: # DEBUG: if print_condition: logger.info(print_statement) - - - def execute_command(command_string:str): - """Executes the given command string""" - - logger.info(f"""{TerminalColors.OKCYAN} - ==== EXECUTING... ==== - {TerminalColors.ENDC}""") - os.system(f"{command_string}") def prompt_for_execution(system_exit_on_terminate: bool, diff --git a/src/registrar/tests/test_transition_domain_migrations.py b/src/registrar/tests/test_transition_domain_migrations.py index bc48fa818..91c8c471e 100644 --- a/src/registrar/tests/test_transition_domain_migrations.py +++ b/src/registrar/tests/test_transition_domain_migrations.py @@ -138,21 +138,21 @@ class TestLogins(TestCase): self.run_master_script() - # TODO: instead of patching....there has got to be a way of making sure subsequent commands use the django database - # Patch subroutines for migrations - def side_effect(): - self.run_load_domains() - self.run_transfer_domains() - patcher = patch("registrar.management.commands.master_domain_migrations.Command.run_migration_scripts") - mocked_get = patcher.start() - mocked_get.side_effect = side_effect - # Patch subroutines for sending invitations - def side_effect(): - # TODO: what should happen here? - return - patcher = patch("registrar.management.commands.master_domain_migrations.Command.run_send_invites_script") - mocked_get = patcher.start() - mocked_get.side_effect = side_effect + # # TODO: instead of patching....there has got to be a way of making sure subsequent commands use the django database + # # Patch subroutines for migrations + # def side_effect(): + # self.run_load_domains() + # self.run_transfer_domains() + # patcher = patch("registrar.management.commands.master_domain_migrations.Command.run_migration_scripts") + # mocked_get = patcher.start() + # mocked_get.side_effect = side_effect + # # Patch subroutines for sending invitations + # def side_effect(): + # # TODO: what should happen here? + # return + # patcher = patch("registrar.management.commands.master_domain_migrations.Command.run_send_invites_script") + # mocked_get = patcher.start() + # mocked_get.side_effect = side_effect # STEP 2: (analyze the tables just like the migration script does, but add assert statements) expected_total_transition_domains = 8