Skip to content

Commit

Permalink
rework delete account tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed May 1, 2024
1 parent 841f21f commit 49387e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
16 changes: 0 additions & 16 deletions portal/tests/test_teacher.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,22 +838,6 @@ def test_delete_account(self):
time.sleep(FADE_TIME)

assert page.has_classes()
page = page.open_account_tab()

# test actual deletion
page.browser.find_element(By.ID, "id_delete_password").send_keys(password)
page.browser.find_element(By.ID, "delete_account_button").click()

time.sleep(FADE_TIME)
page.browser.find_element(By.ID, "delete_button").click()

# # back to homepage
# assert page.browser.find_element(By.CLASS_NAME, "banner--homepage")

# user should not be able to login now
page = HomePage(self.selenium).go_to_teacher_login_page().login_failure(email, password)

assert page.has_login_failed("form-login-teacher", INVALID_LOGIN_MESSAGE)

def test_onboarding_complete(self):
email, password = signup_teacher_directly()
Expand Down
2 changes: 2 additions & 0 deletions portal/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ def test_delete_account(self, mock_send_dotdigital_email: Mock):
assert u.first_name == "Deleted"
assert not u.is_active

assert c.login(email, password) == False

@patch("portal.views.registration.send_dotdigital_email")
def test_delete_account_admin(self, mock_send_dotdigital_email: Mock):
"""test the passing of admin role after deletion of an admin account"""
Expand Down

0 comments on commit 49387e7

Please sign in to comment.