mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Add option update_password (always, on_create) to tower_user module
This commit is contained in:
committed by
Alan Rominger
parent
ef3a497c42
commit
8e97214309
@@ -44,3 +44,16 @@ def test_password_no_op_warning(run_module, admin_user, mock_auth_stuff, silence
|
||||
silence_warning.assert_called_once_with(
|
||||
"The field password of user {0} has encrypted data and "
|
||||
"may inaccurately report task is changed.".format(result['id']))
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_update_password_on_create(run_module, admin_user, mock_auth_stuff):
|
||||
for i in range(2):
|
||||
result = run_module('tower_user', dict(
|
||||
username='Bob',
|
||||
password='pass4word',
|
||||
update_password='on_create'
|
||||
), admin_user)
|
||||
assert not result.get('failed', False), result.get('msg', result)
|
||||
|
||||
assert not result.get('changed')
|
||||
|
||||
Reference in New Issue
Block a user