mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
change unit tests to work with JobTemplateMixin serializer
This commit is contained in:
parent
bf0a235ce9
commit
dc3e744dda
@ -11,6 +11,7 @@ from awx.main.models import (
|
||||
Role,
|
||||
User,
|
||||
Job,
|
||||
JobTemplate,
|
||||
)
|
||||
from rest_framework.test import APIRequestFactory
|
||||
|
||||
@ -24,7 +25,9 @@ def mock_JT_resource_data():
|
||||
|
||||
@pytest.fixture
|
||||
def job_template(mocker):
|
||||
mock_jt = mocker.MagicMock(pk=5)
|
||||
mock_jt = mocker.MagicMock(spec=JobTemplate)
|
||||
mock_jt.pk = 5
|
||||
mock_jt.host_config_key = '9283920492'
|
||||
mock_jt.resource_validation_data = mock_JT_resource_data
|
||||
return mock_jt
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user