mirror of
https://github.com/ansible/awx.git
synced 2026-04-13 14:09:25 -02:30
bring back meta choice options lost in upgrade
* status and launch_type OPTIONS choices were lost in the django + drf upgrade. This brings them back.
This commit is contained in:
17
awx/main/tests/functional/api/test_unified_jobs_view.py
Normal file
17
awx/main/tests/functional/api/test_unified_jobs_view.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import pytest
|
||||
|
||||
from awx.main.models import UnifiedJob
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_options_fields_choices(instance, options, user):
|
||||
|
||||
url = reverse('api:unified_job_list')
|
||||
response = options(url, None, user('admin', True))
|
||||
|
||||
assert 'launch_type' in response.data['actions']['GET']
|
||||
assert 'choice' == response.data['actions']['GET']['launch_type']['type']
|
||||
assert UnifiedJob.LAUNCH_TYPE_CHOICES == response.data['actions']['GET']['launch_type']['choices']
|
||||
assert 'choice' == response.data['actions']['GET']['status']['type']
|
||||
assert UnifiedJob.STATUS_CHOICES == response.data['actions']['GET']['status']['choices']
|
||||
|
||||
Reference in New Issue
Block a user