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`.
This commit is contained in:
11
tests/forms/test_task_order.py
Normal file
11
tests/forms/test_task_order.py
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
Reference in New Issue
Block a user