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:
AlanCoding
2020-04-29 14:51:03 -04:00
committed by beeankha
parent 694c7e8af5
commit d825cca9f2
4 changed files with 135 additions and 228 deletions

View File

@@ -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']()