cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list="")
+ cf_payees_list="",
+ summary="")
EXAMPLE_LOOP1_BUG1 = MockBug(bug_id=1,
cf_budget_parent=1,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list="")
+ cf_payees_list="",
+ summary="")
EXAMPLE_LOOP2_BUG1 = MockBug(bug_id=1,
cf_budget_parent=2,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list="")
+ cf_payees_list="",
+ summary="")
EXAMPLE_LOOP2_BUG2 = MockBug(bug_id=2,
cf_budget_parent=1,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list="")
+ cf_payees_list="",
+ summary="")
EXAMPLE_PARENT_BUG1 = MockBug(bug_id=1,
cf_budget_parent=None,
cf_budget="10",
cf_total_budget="20",
cf_nlnet_milestone="milestone 1",
- cf_payees_list="")
+ cf_payees_list="",
+ summary="")
EXAMPLE_CHILD_BUG2 = MockBug(bug_id=2,
cf_budget_parent=1,
cf_budget="10",
cf_total_budget="10",
cf_nlnet_milestone="milestone 1",
- cf_payees_list="")
+ cf_payees_list="",
+ summary="")
EXAMPLE_CONFIG = Config.from_str(
"""
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
MockBug(bug_id=2,
cf_budget_parent=1,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
MockBug(bug_id=3,
cf_budget_parent=1,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
MockBug(bug_id=4,
cf_budget_parent=1,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
MockBug(bug_id=5,
cf_budget_parent=3,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
MockBug(bug_id=6,
cf_budget_parent=3,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
MockBug(bug_id=7,
cf_budget_parent=5,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
self.assertEqual(len(bg.nodes), 7)
node1: Node = bg.nodes[1]
cf_budget="0",
cf_total_budget="10",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors, [
cf_budget="10",
cf_total_budget="0",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors, [
cf_budget="10",
cf_total_budget="10",
cf_nlnet_milestone=None,
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors, [BudgetGraphMoneyWithNoMilestone])
cf_budget=budget,
cf_total_budget=total_budget,
cf_nlnet_milestone="milestone 1",
- cf_payees_list=payees_list),
+ cf_payees_list=payees_list,
+ summary=""),
MockBug(bug_id=2,
cf_budget_parent=1,
cf_budget=child_budget,
cf_total_budget=child_budget,
cf_nlnet_milestone="milestone 1",
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
node1: Node = bg.nodes[1]
errors = bg.get_errors()
cf_total_budget=str(
node1.fixed_budget_including_subtasks),
cf_nlnet_milestone="milestone 1",
- cf_payees_list=payees_list),
+ cf_payees_list=payees_list,
+ summary=""),
MockBug(bug_id=2,
cf_budget_parent=1,
cf_budget=child_budget,
cf_total_budget=child_budget,
cf_nlnet_milestone="milestone 1",
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors,
cf_budget="0",
cf_total_budget="-10",
cf_nlnet_milestone="milestone 1",
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors, [
cf_budget="-10",
cf_total_budget="0",
cf_nlnet_milestone="milestone 1",
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors, [
cf_budget="-10",
cf_total_budget="-10",
cf_nlnet_milestone="milestone 1",
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone="milestone 1",
- cf_payees_list=cf_payees_list),
+ cf_payees_list=cf_payees_list,
+ summary=""),
], EXAMPLE_CONFIG)
self.assertErrorTypesMatches(bg.get_errors(), error_types)
self.assertEqual(len(bg.nodes), 1)
cf_budget="10",
cf_total_budget="10",
cf_nlnet_milestone="milestone 1",
- cf_payees_list="person1 = 5\nperson2 = 10"),
+ cf_payees_list="person1 = 5\nperson2 = 10",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone="milestone 1",
- cf_payees_list=cf_payees_list),
+ cf_payees_list=cf_payees_list,
+ summary=""),
], EXAMPLE_CONFIG).get_errors()
self.assertErrorTypesMatches(errors,
[BudgetGraphPayeesParseError])
cf_budget="10",
cf_total_budget="10",
cf_nlnet_milestone="milestone 1",
- cf_payees_list="""person1 = -10"""),
+ cf_payees_list="""person1 = -10""",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors,
cf_payees_list="""
person1 = 5
alias1 = 5
- """),
+ """,
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors,
cf_budget="10",
cf_total_budget="10",
cf_nlnet_milestone="milestone 2",
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors,
cf_budget="0",
cf_total_budget="0",
cf_nlnet_milestone="milestone 2",
- cf_payees_list=""),
+ cf_payees_list="",
+ summary=""),
], EXAMPLE_CONFIG)
errors = bg.get_errors()
self.assertErrorTypesMatches(errors, [])
cf_budget="10",
cf_total_budget="10",
cf_nlnet_milestone="milestone 1",
- cf_payees_list="person1 = 3\nperson2 = 7"),
+ cf_payees_list="person1 = 3\nperson2 = 7",
+ summary=""),
MockBug(bug_id=2,
cf_budget_parent=None,
cf_budget="10",
cf_total_budget="10",
cf_nlnet_milestone="milestone 2",
- cf_payees_list="person3 = 5\nperson2 = 5"),
+ cf_payees_list="person3 = 5\nperson2 = 5",
+ summary=""),
], EXAMPLE_CONFIG)
self.assertErrorTypesMatches(bg.get_errors(), [])
person1 = EXAMPLE_CONFIG.people["person1"]