show or hide manual TO fields based on query param

This commit is contained in:
dandds
2018-08-20 15:51:32 -04:00
parent a574734a8b
commit 735b9b5179
4 changed files with 79 additions and 59 deletions

View File

@@ -1,6 +1,6 @@
import pytest
from atst.forms.financial import suggest_pe_id, FinancialForm
from atst.forms.financial import suggest_pe_id, FinancialForm, ExtendedFinancialForm
@pytest.mark.parametrize("input_,expected", [
@@ -18,7 +18,7 @@ def test_funding_type_other_not_required_if_funding_type_is_not_other():
form_data = {
"funding_type": "PROC"
}
form = FinancialForm(data=form_data)
form = ExtendedFinancialForm(data=form_data)
form.validate()
assert "funding_type_other" not in form.errors
@@ -27,7 +27,7 @@ def test_funding_type_other_required_if_funding_type_is_other():
form_data = {
"funding_type": "OTHER"
}
form = FinancialForm(data=form_data)
form = ExtendedFinancialForm(data=form_data)
form.validate()
assert "funding_type_other" in form.errors