Skip to content

Commit 6c70ebc

Browse files
committed
feat(commands/reset_password): force password change
1 parent 4c5ec4a commit 6c70ebc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler_admin/commands/reset_password.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def reset_password(args: Namespace) -> int:
2525
print(f"User does not exist: {account}")
2626
return RESULT_FAILURE
2727

28-
command = ("update", "user", account, "password", "random")
28+
command = ("update", "user", account, "password", "random", "changepassword")
2929

3030
notify = getattr(args, "notify", None)
3131
if notify:

tests/commands/test_reset_password.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_reset_password_user_exists(mock_google_user_exists, mock_google_CallGAM
4343
mock_google_CallGAMCommand.assert_called_once()
4444
call_args = " ".join(mock_google_CallGAMCommand.call_args[0][0])
4545
assert "update user" in call_args
46-
assert "password random" in call_args
46+
assert "password random changepassword" in call_args
4747

4848

4949
def test_reset_password_notify(mock_google_user_exists, mock_google_CallGAMCommand):
@@ -57,5 +57,5 @@ def test_reset_password_notify(mock_google_user_exists, mock_google_CallGAMComma
5757
mock_google_CallGAMCommand.assert_called_once()
5858
call_args = " ".join(mock_google_CallGAMCommand.call_args[0][0])
5959
assert "update user" in call_args
60-
assert "password random" in call_args
60+
assert "password random changepassword" in call_args
6161
assert f"notify [email protected] from {USER_HELLO}" in call_args

0 commit comments

Comments
 (0)