mirror of
https://github.com/ansible/awx.git
synced 2026-03-14 15:37:29 -02:30
use standard type string algorithm in scheduler
This commit is contained in:
@@ -8,6 +8,15 @@ from uuid import uuid4
|
||||
|
||||
from awx.main.utils import common
|
||||
|
||||
from awx.main.models import (
|
||||
Job,
|
||||
AdHocCommand,
|
||||
InventoryUpdate,
|
||||
ProjectUpdate,
|
||||
SystemJob,
|
||||
WorkflowJob
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('input_, output', [
|
||||
({"foo": "bar"}, {"foo": "bar"}),
|
||||
@@ -27,3 +36,16 @@ def test_set_environ():
|
||||
assert set(os.environ.keys()) - set(old_environ.keys()) == set([key])
|
||||
assert os.environ == old_environ
|
||||
assert key not in os.environ
|
||||
|
||||
|
||||
# Cases relied on for scheduler dependent jobs list
|
||||
@pytest.mark.parametrize('model,name', [
|
||||
(Job, 'job'),
|
||||
(AdHocCommand, 'ad_hoc_command'),
|
||||
(InventoryUpdate, 'inventory_update'),
|
||||
(ProjectUpdate, 'project_update'),
|
||||
(SystemJob, 'system_job'),
|
||||
(WorkflowJob, 'workflow_job')
|
||||
])
|
||||
def test_get_type_for_model(model, name):
|
||||
assert common.get_type_for_model(model) == name
|
||||
|
||||
Reference in New Issue
Block a user