Commit ff4caf95a291cf07789b76b79edd571c8332a83a

Authored by alexdiatlov
Committed by GitHub
2 parents b4196659 db2b00ba

Merge pull request #168 from ProzorroUKR/plan_status/breakdown

fix plan breakdown
... ... @@ -1000,7 +1000,7 @@ def test_confirm_plan_cancel_data():
1000 1000
1001 1001 def test_breakdown_data():
1002 1002 return munchify({
1003   - "title": random.choice(["state", "local"]),
  1003 + "title": random.choice(["state", "local", "crimea", "own", "fund", "loan", "other"]),
1004 1004 "description": fake.description(),
1005 1005 "value": {
1006 1006 "currency": "UAH"
... ... @@ -1010,5 +1010,5 @@ def test_breakdown_data():
1010 1010
1011 1011 def breakdown_value_generation(number_of_breakdown, plan_value):
1012 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 1014 return value_data
... ...
Please register or login to post a comment