Skip to content

Commit

Permalink
fix: fix parent email test
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed Apr 2, 2024
1 parent 48cb482 commit dc6b581
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions portal/tests/test_independent_student.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from django.urls import reverse
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from unittest.mock import ANY

from portal.forms.error_messages import INVALID_LOGIN_MESSAGE

Expand Down Expand Up @@ -138,8 +137,7 @@ def test_signup_invalid_name_fails(self):
# Assert response isn't a redirect (submit failure)
assert response.status_code == 200

def test_signup_under_13_sends_parent_email(mocker):
mocked_send = mocker.patch("common.mail.send_dotdigital_email")
def test_signup_under_13_sends_parent_email(self):
c = Client()

response = c.post(
Expand All @@ -158,7 +156,8 @@ def test_signup_under_13_sends_parent_email(mocker):
)

assert response.status_code == 302
mocked_send.assert_called_once_with(1551587, ANY, ANY)
assert len(mail.outbox) == 1
assert mail.outbox[0].subject == "Code for Life account request"


# Class for Selenium tests. We plan to replace these and turn them into Cypress tests
Expand Down

0 comments on commit dc6b581

Please sign in to comment.