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

@@ -152,19 +152,23 @@ class TestBudget:
assert (
to.total_contract_amount
== clin1.obligated_amount + clin2.obligated_amount + clin3.obligated_amount
== clin1.total_amount + clin2.total_amount + clin3.total_amount
)
def test_total_obligated_funds(self):
to = TaskOrder()
clin4 = CLINFactory(task_order=to, jedi_clin_type=JEDICLINType.JEDI_CLIN_4)
assert to.total_obligated_funds == 0
clin1 = CLINFactory(task_order=to, jedi_clin_type=JEDICLINType.JEDI_CLIN_1)
clin2 = CLINFactory(task_order=to, jedi_clin_type=JEDICLINType.JEDI_CLIN_2)
clin3 = CLINFactory(task_order=to, jedi_clin_type=JEDICLINType.JEDI_CLIN_3)
clin4 = CLINFactory(task_order=to, jedi_clin_type=JEDICLINType.JEDI_CLIN_4)
assert (
to.total_obligated_funds == clin1.obligated_amount + clin3.obligated_amount
to.total_obligated_funds
== clin1.obligated_amount
+ clin2.obligated_amount
+ clin3.obligated_amount
+ clin4.obligated_amount
)