def METHOD_NAME(self, app, monkeypatch):
    user = factories.User()
    request_reset = mock.Mock()
    monkeypatch.setattr(
        mailer, u"send_reset_link", mailer.create_reset_key
    )
    with signals.request_password_reset.connected_to(request_reset):
        app.post(
            url_for(u"user.request_reset"), data={u"user": user[u"name"]}
        )
        assert request_reset.call_count == 1
    perform_reset = mock.Mock()
    user_obj = model.User.get(user['id'])
    with signals.perform_password_reset.connected_to(perform_reset):
        app.post(
            url_for(
                u"user.perform_reset",
                id=user[u"id"],
                key=user_obj.reset_key
            ),
            data={
                u'password1': u'password123',
                u'password2': u'password123',
            }
        )
        assert perform_reset.call_count == 1