From 3dac65df79f1db5e1ce423df4a26a3f43526b9df Mon Sep 17 00:00:00 2001 From: Erin Song <121973038+erinysong@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:37:58 -0700 Subject: [PATCH] Refactor portfolio view tests --- src/registrar/tests/test_views_portfolio.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/registrar/tests/test_views_portfolio.py b/src/registrar/tests/test_views_portfolio.py index 8d539e5ad..053c9a566 100644 --- a/src/registrar/tests/test_views_portfolio.py +++ b/src/registrar/tests/test_views_portfolio.py @@ -433,8 +433,8 @@ class TestPortfolio(WebTest): @boto3_mocking.patching @less_console_noise_decorator - @patch("registrar.utility.email_invitations.send_templated_email") - def test_org_update_sends_admin_email(self, mock_send_templated_email): + @patch("registrar.views.portfolios.send_portfolio_organization_update_email") + def test_org_update_sends_admin_email(self, mock_send_organization_update_email): """Updating organization information emails organization admin.""" with override_flag("organization_feature", active=True): self.app.set_user(self.user.username) @@ -469,12 +469,7 @@ class TestPortfolio(WebTest): self.assertEqual(success_result_page.status_code, 302) # Verify that the notification emails were sent to domain manager - mock_send_templated_email.assert_called_once_with( - "emails/portfolio_org_update_notification.txt", - "emails/portfolio_org_update_notification_subject.txt", - to_address=self.admin.email, - context=ANY, - ) + mock_send_organization_update_email.assert_called_once() @less_console_noise_decorator def test_portfolio_in_session_when_organization_feature_active(self):