mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-25 18:43:49 +02:00
Refactor portfolio view tests
This commit is contained in:
parent
d2e1035ffc
commit
3dac65df79
1 changed files with 3 additions and 8 deletions
|
@ -433,8 +433,8 @@ class TestPortfolio(WebTest):
|
||||||
|
|
||||||
@boto3_mocking.patching
|
@boto3_mocking.patching
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
@patch("registrar.utility.email_invitations.send_templated_email")
|
@patch("registrar.views.portfolios.send_portfolio_organization_update_email")
|
||||||
def test_org_update_sends_admin_email(self, mock_send_templated_email):
|
def test_org_update_sends_admin_email(self, mock_send_organization_update_email):
|
||||||
"""Updating organization information emails organization admin."""
|
"""Updating organization information emails organization admin."""
|
||||||
with override_flag("organization_feature", active=True):
|
with override_flag("organization_feature", active=True):
|
||||||
self.app.set_user(self.user.username)
|
self.app.set_user(self.user.username)
|
||||||
|
@ -469,12 +469,7 @@ class TestPortfolio(WebTest):
|
||||||
self.assertEqual(success_result_page.status_code, 302)
|
self.assertEqual(success_result_page.status_code, 302)
|
||||||
|
|
||||||
# Verify that the notification emails were sent to domain manager
|
# Verify that the notification emails were sent to domain manager
|
||||||
mock_send_templated_email.assert_called_once_with(
|
mock_send_organization_update_email.assert_called_once()
|
||||||
"emails/portfolio_org_update_notification.txt",
|
|
||||||
"emails/portfolio_org_update_notification_subject.txt",
|
|
||||||
to_address=self.admin.email,
|
|
||||||
context=ANY,
|
|
||||||
)
|
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
def test_portfolio_in_session_when_organization_feature_active(self):
|
def test_portfolio_in_session_when_organization_feature_active(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue