Beispiel #1
0
def change_password(username, password):
    try:
        change_pass.changes_password(username, password)
    except ProgrammingError:
        print(
            '\n\nMissing migrations, please execute: \n\nfaraday-manage migrate'
        )
        sys.exit(1)
Beispiel #2
0
def test_changes_password_command(session):
    UserFactory.create(username='******',
                       password=hash_password('old_pass'))
    changes_password('test_change_pass', 'new_pass')

    user = User.query.filter_by(username='******').first()

    assert not verify_password('old_pass', user.password)
    assert verify_password('new_pass', user.password)
Beispiel #3
0
def change_password(username, password):
    change_pass.changes_password(username, password)