Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
(cherry picked from commit c85b150)
  • Loading branch information
yocalebo authored and bugclerk committed Oct 17, 2024
1 parent 860da6c commit 9eb7142
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/api2/test_password_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ def test_restricted_user_set_password():
'new_password': 'CANARY',
})

with pytest.raises(ValidationErrors) as ve:
# Providing invalid old password for a limited user
# should raise an error
c2.call('user.set_password', {
'username': TEST_USERNAME_2,
'old_password': 'ANOTHER CANARY',
'new_password': 'CANARY',
})

call("user.update", u['id'], {'password_disabled': True})
with pytest.raises(ValidationErrors) as ve:
# This should fail because we've disabled password auth
Expand Down

0 comments on commit 9eb7142

Please sign in to comment.