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
|
return True
|
||||||
|
|
||||||
|
|
||||||
def formatted_number_to_int(num):
|
def number_to_int(num):
|
||||||
if not num:
|
if num:
|
||||||
return
|
return int(num)
|
||||||
else:
|
|
||||||
return int(num.replace(",",""))
|
|
||||||
|
|
||||||
|
|
||||||
class BaseFinancialForm(ValidatedForm):
|
class BaseFinancialForm(ValidatedForm):
|
||||||
@ -171,40 +169,40 @@ class ExtendedFinancialForm(BaseFinancialForm):
|
|||||||
"<dl><dt>CLIN 0001</dt> - <dd>Unclassified IaaS and PaaS Amount</dd></dl>",
|
"<dl><dt>CLIN 0001</dt> - <dd>Unclassified IaaS and PaaS Amount</dd></dl>",
|
||||||
validators=[Required()],
|
validators=[Required()],
|
||||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
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(
|
clin_0003 = StringField(
|
||||||
"<dl><dt>CLIN 0003</dt> - <dd>Unclassified Cloud Support Package</dd></dl>",
|
"<dl><dt>CLIN 0003</dt> - <dd>Unclassified Cloud Support Package</dd></dl>",
|
||||||
validators=[Required()],
|
validators=[Required()],
|
||||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
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(
|
clin_1001 = StringField(
|
||||||
"<dl><dt>CLIN 1001</dt> - <dd>Unclassified IaaS and PaaS Amount <br> OPTION PERIOD 1</dd></dl>",
|
"<dl><dt>CLIN 1001</dt> - <dd>Unclassified IaaS and PaaS Amount <br> OPTION PERIOD 1</dd></dl>",
|
||||||
validators=[Required()],
|
validators=[Required()],
|
||||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
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(
|
clin_1003 = StringField(
|
||||||
"<dl><dt>CLIN 1003</dt> - <dd>Unclassified Cloud Support Package <br> OPTION PERIOD 1</dd></dl>",
|
"<dl><dt>CLIN 1003</dt> - <dd>Unclassified Cloud Support Package <br> OPTION PERIOD 1</dd></dl>",
|
||||||
validators=[Required()],
|
validators=[Required()],
|
||||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
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(
|
clin_2001 = StringField(
|
||||||
"<dl><dt>CLIN 2001</dt> - <dd>Unclassified IaaS and PaaS Amount <br> OPTION PERIOD 2</dd></dl>",
|
"<dl><dt>CLIN 2001</dt> - <dd>Unclassified IaaS and PaaS Amount <br> OPTION PERIOD 2</dd></dl>",
|
||||||
validators=[Required()],
|
validators=[Required()],
|
||||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
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(
|
clin_2003 = StringField(
|
||||||
"<dl><dt>CLIN 2003</dt> - <dd>Unclassified Cloud Support Package <br> OPTION PERIOD 2</dd></dl>",
|
"<dl><dt>CLIN 2003</dt> - <dd>Unclassified Cloud Support Package <br> OPTION PERIOD 2</dd></dl>",
|
||||||
validators=[Required()],
|
validators=[Required()],
|
||||||
description="Review your task order document, the amounts for each CLIN must match exactly here",
|
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 = {
|
extended_data = {
|
||||||
"funding_type": "RDTE",
|
"funding_type": "RDTE",
|
||||||
"funding_type_other": "other",
|
"funding_type_other": "other",
|
||||||
"clin_0001": "50,000",
|
"clin_0001": "50000",
|
||||||
"clin_0003": "13,000",
|
"clin_0003": "13000",
|
||||||
"clin_1001": "30,000",
|
"clin_1001": "30000",
|
||||||
"clin_1003": "7,000",
|
"clin_1003": "7000",
|
||||||
"clin_2001": "30,000",
|
"clin_2001": "30000",
|
||||||
"clin_2003": "7,000",
|
"clin_2003": "7000",
|
||||||
}
|
}
|
||||||
|
|
||||||
def _set_monkeypatches(self, monkeypatch):
|
def _set_monkeypatches(self, monkeypatch):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user