diff --git a/cfl_common/common/tests/utils/teacher.py b/cfl_common/common/tests/utils/teacher.py index bd6474e75..d4ffe677c 100644 --- a/cfl_common/common/tests/utils/teacher.py +++ b/cfl_common/common/tests/utils/teacher.py @@ -34,8 +34,8 @@ def signup_teacher_directly(preverified=True, **kwargs): return email_address, password -@patch("common.helpers.emails.send_dotdigital_email") -def signup_duplicate_teacher_fail(page, mock_send_dotdigital_email, duplicate_email=None): +@patch("portal.views.home.send_dotdigital_email") +def signup_duplicate_teacher_fail(page, mock_send_dotdigital_email: Mock, duplicate_email=None): page = page.go_to_signup_page() first_name, last_name, email_address, password = generate_details() diff --git a/portal/tests/test_independent_student.py b/portal/tests/test_independent_student.py index 2932c9056..e0a7f917d 100644 --- a/portal/tests/test_independent_student.py +++ b/portal/tests/test_independent_student.py @@ -228,6 +228,8 @@ def test_signup_duplicate_email_failure(self, mock_send_dotdigital_email: Mock): page, _, _, email, _ = create_independent_student(page) assert is_email_verified_message_showing(self.selenium) + mock_send_dotdigital_email.assert_called() + login_link = mock_send_dotdigital_email.call_args.kwargs["personalization_values"]["LOGIN_URL"] page = self.go_to_homepage()