Skip to content

Commit

Permalink
[#2838] delete irrelevant test which uses duplicate emails
Browse files Browse the repository at this point in the history
  • Loading branch information
calexandr committed Jan 10, 2020
1 parent f4bf1d6 commit 29852d4
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions ckan/tests/controllers/test_user.py
Expand Up @@ -851,22 +851,6 @@ def test_request_reset_by_name(self, send_reset_link, app):
assert "A reset link has been emailed to you" in response
assert send_reset_link.call_args[0][0].id == user["id"]

@mock.patch("ckan.lib.mailer.send_reset_link")
def test_request_reset_when_duplicate_emails(self, send_reset_link, app):
user_a = factories.User(email="me@example.com")
user_b = factories.User(email="me@example.com")

offset = url_for("user.request_reset")
response = app.post(
offset, params=dict(user="me@example.com"), status=302
).follow()

assert "A reset link has been emailed to you" in response
emailed_users = [
call[0][0].name for call in send_reset_link.call_args_list
]
assert emailed_users == [user_a["name"], user_b["name"]]

def test_request_reset_without_param(self, app):

offset = url_for("user.request_reset")
Expand Down

0 comments on commit 29852d4

Please sign in to comment.