more rename, mostly in test

This commit is contained in:
Seth Foster
2021-04-29 11:58:41 -04:00
parent a695274cb6
commit 7a63785255
105 changed files with 616 additions and 625 deletions

View File

@@ -11,7 +11,7 @@ from awx.main.models.ad_hoc_commands import AdHocCommand
@pytest.mark.django_db
def test_ad_hoc_command_wait_successful(run_module, admin_user):
command = AdHocCommand.objects.create(status='successful', started=now(), finished=now())
result = run_module('tower_ad_hoc_command_wait', dict(command_id=command.id), admin_user)
result = run_module('ad_hoc_command_wait', dict(command_id=command.id), admin_user)
result.pop('invocation', None)
result['elapsed'] = float(result['elapsed'])
assert result.pop('finished', '')[:10] == str(command.finished)[:10]
@@ -22,7 +22,7 @@ def test_ad_hoc_command_wait_successful(run_module, admin_user):
@pytest.mark.django_db
def test_ad_hoc_command_wait_failed(run_module, admin_user):
command = AdHocCommand.objects.create(status='failed', started=now(), finished=now())
result = run_module('tower_ad_hoc_command_wait', dict(command_id=command.id), admin_user)
result = run_module('ad_hoc_command_wait', dict(command_id=command.id), admin_user)
result.pop('invocation', None)
result['elapsed'] = float(result['elapsed'])
assert result.pop('finished', '')[:10] == str(command.finished)[:10]
@@ -39,6 +39,6 @@ def test_ad_hoc_command_wait_failed(run_module, admin_user):
@pytest.mark.django_db
def test_ad_hoc_command_wait_not_found(run_module, admin_user):
result = run_module('tower_ad_hoc_command_wait', dict(command_id=42), admin_user)
result = run_module('ad_hoc_command_wait', dict(command_id=42), admin_user)
result.pop('invocation', None)
assert result == {"failed": True, "msg": "Unable to wait on ad hoc command 42; that ID does not exist in Tower."}