atst/tests/forms/test_task_order.py
dandds c4d8067f45 Fixes a bug where the CLIN type was not displaying correctly for saved
TOs.

The enum for the CLIN type needs to be coerced in the form data so that
the `jedi_clin_field` data is the value of the enum option. Perviously
the `jedi_clin_field` was being populated with a stringified
representation of the enum, like `JEDICLINType.JEDI_CLIN_1`.
2019-06-18 11:33:41 -04:00

12 lines
358 B
Python

from atst.forms.task_order import CLINForm
from atst.models import JEDICLINType
import tests.factories as factories
def test_clin_form_jedi_clin_type():
jedi_type = JEDICLINType.JEDI_CLIN_2
clin = factories.CLINFactory.create(jedi_clin_type=jedi_type)
clin_form = CLINForm(obj=clin)
assert clin_form.jedi_clin_type.data == jedi_type.value