Skip to content

Commit

Permalink
Test: Continuación test d'Hondt; EGCETSII#27
Browse files Browse the repository at this point in the history
  • Loading branch information
isamunval committed Jan 6, 2022
1 parent cae7378 commit 3208034
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions decide/postproc/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,27 @@ def test_dhondt(self):
]
}

expected_result = [
{ "option": "Option 1", "number": 1, "votes": 5, "postproc": 3 },
{ "option": "Option 5", "number": 5, "votes": 5, "postproc": 3 },
{ "option": "Option 3", "number": 3, "votes": 3, "postproc": 1 },
{ "option": "Option 4", "number": 4, "votes": 2, "postproc": 1 },
{ "option": "Option 2", "number": 2, "votes": 0, "postproc": 0 },
{ "option": "Option 6", "number": 6, "votes": 1, "postproc": 0 },
]


data = {
"type": "DHONDT",
"seats": 10,
"options": [
{ "option": "Option 1", "number": 1, "votes": 20 },
{ "option": "Option 2", "number": 2, "votes": 11 },
{ "option": "Option 3", "number": 3, "votes": 0 },
{ "option": "Option 4", "number": 4, "votes": 10 },
{ "option": "Option 5", "number": 5, "votes": 5 },
]
}



0 comments on commit 3208034

Please sign in to comment.