Update existing tests for new CLIN logic

- Factory adds total_amount field, which is always greater than obligated
field
- add total_amount field on tests that create TOs manually
- update tests that calculate total_contract_amount and
total_obligated_amount
This commit is contained in:
graham-dds
2019-09-11 11:52:25 -04:00
parent 0abd46eb4f
commit 2af0a2ecaf
5 changed files with 21 additions and 5 deletions

View File

@@ -84,6 +84,7 @@ def test_create_adds_clins():
"start_date": date(2020, 1, 1),
"end_date": date(2021, 1, 1),
"obligated_amount": Decimal("5000"),
"total_amount": Decimal("10000"),
},
{
"jedi_clin_type": "JEDI_CLIN_1",
@@ -91,6 +92,7 @@ def test_create_adds_clins():
"start_date": date(2020, 1, 1),
"end_date": date(2021, 1, 1),
"obligated_amount": Decimal("5000"),
"total_amount": Decimal("10000"),
},
]
task_order = TaskOrders.create(
@@ -113,6 +115,7 @@ def test_update_adds_clins():
"start_date": date(2020, 1, 1),
"end_date": date(2021, 1, 1),
"obligated_amount": Decimal("5000"),
"total_amount": Decimal("10000"),
},
{
"jedi_clin_type": "JEDI_CLIN_1",
@@ -120,6 +123,7 @@ def test_update_adds_clins():
"start_date": date(2020, 1, 1),
"end_date": date(2021, 1, 1),
"obligated_amount": Decimal("5000"),
"total_amount": Decimal("10000"),
},
]
task_order = TaskOrders.create(
@@ -144,6 +148,7 @@ def test_update_does_not_duplicate_clins():
"start_date": date(2020, 1, 1),
"end_date": date(2021, 1, 1),
"obligated_amount": Decimal("5000"),
"total_amount": Decimal("10000"),
},
{
"jedi_clin_type": "JEDI_CLIN_1",
@@ -151,6 +156,7 @@ def test_update_does_not_duplicate_clins():
"start_date": date(2020, 1, 1),
"end_date": date(2021, 1, 1),
"obligated_amount": Decimal("5000"),
"total_amount": Decimal("10000"),
},
]
task_order = TaskOrders.update(