Ensure that a fallback EE is available to be found

for the failing tests.
This commit is contained in:
Jeff Bradberry
2020-12-09 10:28:12 -05:00
committed by Shane McDonald
parent 5f1da2b923
commit 4a0fc3e1af
2 changed files with 7 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ from awx.main.models import (
AdHocCommand,
Credential,
CredentialType,
ExecutionEnvironment,
Inventory,
InventorySource,
InventoryUpdate,
@@ -657,9 +658,12 @@ class TestGenericRun():
assert env['FOO'] == 'BAR'
@pytest.mark.django_db
class TestAdhocRun(TestJobExecution):
def test_options_jinja_usage(self, adhoc_job, adhoc_update_model_wrapper):
ExecutionEnvironment.objects.create(name='test EE', managed_by_tower=True)
adhoc_job.module_args = '{{ ansible_ssh_pass }}'
adhoc_job.websocket_emit_status = mock.Mock()
adhoc_job.send_notification_templates = mock.Mock()