コード例 #1
0
def test_cant_change_password_for_firebase_user():
    user = User('*****@*****.**', 'pa$$word', 'John Doe', '1111', 'NULL', True,
                True, True)
    old_hash = user.hash

    with pytest.raises(CantChangePasswordForFirebaseUser):
        user.change_password('password')
コード例 #2
0
def test_change_password_successfully():
    user = User('*****@*****.**', 'pa$$word', 'John Doe', '1111', 'NULL', False,
                True, True)
    old_hash = user.hash

    user.change_password('password')

    assert not user.hash == old_hash