Commit db2b00bac79be8bbd7b0b004dcb03cec740d5472

Authored by AlexDiatlov
1 parent b72ed52e

fix plan breakdown

@@ -1000,7 +1000,7 @@ def test_confirm_plan_cancel_data(): @@ -1000,7 +1000,7 @@ def test_confirm_plan_cancel_data():
1000 1000
1001 def test_breakdown_data(): 1001 def test_breakdown_data():
1002 return munchify({ 1002 return munchify({
1003 - "title": random.choice(["state", "local"]), 1003 + "title": random.choice(["state", "local", "crimea", "own", "fund", "loan", "other"]),
1004 "description": fake.description(), 1004 "description": fake.description(),
1005 "value": { 1005 "value": {
1006 "currency": "UAH" 1006 "currency": "UAH"
@@ -1010,5 +1010,5 @@ def test_breakdown_data(): @@ -1010,5 +1010,5 @@ def test_breakdown_data():
1010 1010
1011 def breakdown_value_generation(number_of_breakdown, plan_value): 1011 def breakdown_value_generation(number_of_breakdown, plan_value):
1012 value_data = [round(random.uniform(1, plan_value / number_of_breakdown), 2) for _ in range(number_of_breakdown - 1)] 1012 value_data = [round(random.uniform(1, plan_value / number_of_breakdown), 2) for _ in range(number_of_breakdown - 1)]
1013 - value_data.append(plan_value - sum(value_data)) 1013 + value_data.append(round(plan_value - sum(value_data), 2))
1014 return value_data 1014 return value_data
Please register or login to post a comment