Merge branch 'devel' into copy_awx_collection

This commit is contained in:
Sean Sullivan
2021-03-12 15:26:59 -06:00
committed by GitHub
19 changed files with 619 additions and 228 deletions

View File

@@ -57,3 +57,23 @@ def test_update_password_on_create(run_module, admin_user, mock_auth_stuff):
assert not result.get('failed', False), result.get('msg', result)
assert not result.get('changed')
@pytest.mark.django_db
def test_update_user(run_module, admin_user, mock_auth_stuff):
result = run_module('tower_user', dict(
username='Bob',
password='pass4word',
is_system_auditor=True
), admin_user)
assert not result.get('failed', False), result.get('msg', result)
assert result.get('changed'), result
update_result = run_module('tower_user', dict(
username='Bob',
is_system_auditor=False
), admin_user)
assert update_result.get('changed')
user = User.objects.get(id=result['id'])
assert not user.is_system_auditor