mirror of
https://github.com/ansible/awx.git
synced 2026-05-22 08:17:39 -02:30
Unit testing of tower_schedule
Move previously integration tests of lookup plugin to unit tests delete all integration tests except some basic demo tests do simple create unit test
This commit is contained in:
@@ -15,7 +15,7 @@ from requests.models import Response
|
||||
import pytest
|
||||
|
||||
from awx.main.tests.functional.conftest import _request
|
||||
from awx.main.models import Organization, Project, Inventory, Credential, CredentialType
|
||||
from awx.main.models import Organization, Project, Inventory, JobTemplate, Credential, CredentialType
|
||||
|
||||
try:
|
||||
import tower_cli # noqa
|
||||
@@ -216,6 +216,16 @@ def inventory(organization):
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def job_template(project, inventory):
|
||||
return JobTemplate.objects.create(
|
||||
name='test-jt',
|
||||
project=project,
|
||||
inventory=inventory,
|
||||
playbook='helloworld.yml'
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def machine_credential(organization):
|
||||
ssh_type = CredentialType.defaults['ssh']()
|
||||
|
||||
Reference in New Issue
Block a user