def test_project_defined_points(client, data):
    project_stats = get_stats_for_project(data.project)
    assert (project_stats['defined_points_per_role'] == {data.role1.pk: 63, data.role2.pk: 0})
    data.user_story1.role_points.filter(role=data.role1).update(points=data.default_points)
    data.user_story1.role_points.filter(role=data.role2).update(points=data.points1)
    project_stats = get_stats_for_project(data.project)
    assert (project_stats['defined_points_per_role'] == {data.role1.pk: 62, data.role2.pk: 1})
def test_project_defined_points(client, data):
    project_stats = get_stats_for_project(data.project)
    assert (project_stats['defined_points_per_role'] == {data.role1.pk: 63, data.role2.pk: 0})
    data.user_story1.role_points.filter(role=data.role1).update(points=data.default_points)
    data.user_story1.role_points.filter(role=data.role2).update(points=data.points1)
    project_stats = get_stats_for_project(data.project)
    assert (project_stats['defined_points_per_role'] == {data.role1.pk: 62, data.role2.pk: 1})