def test_change_password_ok():
    auth, app, user = _get_flask_app()
    client = app.test_client()
    auth.login(user)
    csrf_token = auth.get_csrf_token()

    r = client.post(auth.url_change_password, data=dict(
        password='foobar', np1='lalala', np2='lalala', _csrf_token=csrf_token))
    data = to_unicode(r.data)
    assert u'<!-- PASSWORD UPDATED -->' in data
    assert user.has_password('lalala')
dataset/ETHPy150Open jpscaletti/authcode/tests/test_views.py/test_change_password_ok/original