Skip to content

Commit

Permalink
fix: debug tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed Apr 4, 2024
1 parent 6dbe672 commit f3a1cae
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions portal/tests/test_independent_student.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ def test_login_not_verified(self):
page = page.go_to_independent_student_login_page()
page = page.independent_student_login_failure(username, password)

errors = page.has_login_failed("independent_student_login_form", INVALID_LOGIN_MESSAGE)
assert page.has_login_failed("independent_student_login_form", INVALID_LOGIN_MESSAGE)
print(errors)

verify_email(page)

assert is_email_verified_message_showing(self.selenium)

Expand Down Expand Up @@ -339,7 +343,8 @@ def test_update_name_failure(self):
"student_account_form", "Names may only contain letters, numbers, dashes, underscores, and spaces."
)

def test_change_email(self):
@patch("common.helpers.emails.send_dotdigital_email")
def test_change_email(self, mock_send_dotdigital_email):
homepage = self.go_to_homepage()

_, _, _, student_email, password = create_independent_student(homepage)
Expand All @@ -353,9 +358,7 @@ def test_change_email(self):
assert is_student_details_updated_message_showing(self.selenium)
assert is_email_updated_message_showing(self.selenium)

subject = str(mail.outbox[0].subject)
assert subject == "Email address update"
mail.outbox = []
mock_send_dotdigital_email.assert_called_once_with(1551600, ANY, personalization_values=ANY)

# Try changing email to an existing teacher's email
teacher_email, _ = signup_teacher_directly()
Expand Down

0 comments on commit f3a1cae

Please sign in to comment.