add job data to filed wait jobs

This commit is contained in:
sean-m-ssullivan
2021-06-10 11:57:31 -04:00
parent e610b77f8d
commit 214c27a5cf
2 changed files with 5 additions and 9 deletions

View File

@@ -16,7 +16,8 @@ def test_ad_hoc_command_wait_successful(run_module, admin_user):
result['elapsed'] = float(result['elapsed'])
assert result.pop('finished', '')[:10] == str(command.finished)[:10]
assert result.pop('started', '')[:10] == str(command.started)[:10]
assert result == {"status": "successful", "changed": False, "elapsed": command.elapsed, "id": command.id}
assert result.pop('status', "successful"), result
assert result.get('changed') is False
@pytest.mark.django_db
@@ -27,14 +28,8 @@ def test_ad_hoc_command_wait_failed(run_module, admin_user):
result['elapsed'] = float(result['elapsed'])
assert result.pop('finished', '')[:10] == str(command.finished)[:10]
assert result.pop('started', '')[:10] == str(command.started)[:10]
assert result == {
"status": "failed",
"failed": True,
"changed": False,
"elapsed": command.elapsed,
"id": command.id,
"msg": "The ad hoc command - 1, failed",
}
assert result.get('changed') is False
assert result.pop('status', "failed"), result
@pytest.mark.django_db