expect CLIN data with no commas from the financial verification form
This commit is contained in:
parent
40320baf10
commit
e30d4e238c
@ -68,11 +68,9 @@ def validate_task_order_number(field):
|
||||
return True
|
||||
|
||||
|
||||
def formatted_number_to_int(num):
|
||||
if not num:
|
||||
return
|
||||
else:
|
||||
return int(num.replace(",",""))
|
||||
def number_to_int(num):
|
||||
if num:
|
||||
return int(num)
|
||||
|
||||
|
||||
class BaseFinancialForm(ValidatedForm):
|
||||
@ -171,40 +169,40 @@ class ExtendedFinancialForm(BaseFinancialForm):
|
||||
"<dl><dt>CLIN 0001</dt> - <dd>Unclassified IaaS and PaaS Amount</dd></dl>",
|
||||
validators=[Required()],
|
||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
||||
filters=[formatted_number_to_int]
|
||||
filters=[number_to_int]
|
||||
)
|
||||
|
||||
clin_0003 = StringField(
|
||||
"<dl><dt>CLIN 0003</dt> - <dd>Unclassified Cloud Support Package</dd></dl>",
|
||||
validators=[Required()],
|
||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
||||
filters=[formatted_number_to_int]
|
||||
filters=[number_to_int]
|
||||
)
|
||||
|
||||
clin_1001 = StringField(
|
||||
"<dl><dt>CLIN 1001</dt> - <dd>Unclassified IaaS and PaaS Amount <br> OPTION PERIOD 1</dd></dl>",
|
||||
validators=[Required()],
|
||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
||||
filters=[formatted_number_to_int]
|
||||
filters=[number_to_int]
|
||||
)
|
||||
|
||||
clin_1003 = StringField(
|
||||
"<dl><dt>CLIN 1003</dt> - <dd>Unclassified Cloud Support Package <br> OPTION PERIOD 1</dd></dl>",
|
||||
validators=[Required()],
|
||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
||||
filters=[formatted_number_to_int]
|
||||
filters=[number_to_int]
|
||||
)
|
||||
|
||||
clin_2001 = StringField(
|
||||
"<dl><dt>CLIN 2001</dt> - <dd>Unclassified IaaS and PaaS Amount <br> OPTION PERIOD 2</dd></dl>",
|
||||
validators=[Required()],
|
||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
||||
filters=[formatted_number_to_int]
|
||||
filters=[number_to_int]
|
||||
)
|
||||
|
||||
clin_2003 = StringField(
|
||||
"<dl><dt>CLIN 2003</dt> - <dd>Unclassified Cloud Support Package <br> OPTION PERIOD 2</dd></dl>",
|
||||
validators=[Required()],
|
||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
||||
filters=[formatted_number_to_int]
|
||||
filters=[number_to_int]
|
||||
)
|
||||
|
@ -27,12 +27,12 @@ class TestPENumberInForm:
|
||||
extended_data = {
|
||||
"funding_type": "RDTE",
|
||||
"funding_type_other": "other",
|
||||
"clin_0001": "50,000",
|
||||
"clin_0003": "13,000",
|
||||
"clin_1001": "30,000",
|
||||
"clin_1003": "7,000",
|
||||
"clin_2001": "30,000",
|
||||
"clin_2003": "7,000",
|
||||
"clin_0001": "50000",
|
||||
"clin_0003": "13000",
|
||||
"clin_1001": "30000",
|
||||
"clin_1003": "7000",
|
||||
"clin_2001": "30000",
|
||||
"clin_2003": "7000",
|
||||
}
|
||||
|
||||
def _set_monkeypatches(self, monkeypatch):
|
||||
|
Loading…
x
Reference in New Issue
Block a user