Skip to content

Commit

Permalink
Test: creación de otro test d'hondt negativo; EGCETSII#27
Browse files Browse the repository at this point in the history
  • Loading branch information
isamunval committed Jan 6, 2022
1 parent 35490c3 commit 7e3aaf5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions decide/postproc/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,4 +359,26 @@ def test_dhondt_error(self):

values = response.json()
self.assertEqual(values, expected_result)

def test_dhondt_mal(self):
"""
* Definicion: Test negativo que no recibe escaños
* Entrada: Votacion
- Number: id del partido
- Option: nombre de la opcion
- Votes: Numero de votos que recibe en la votación
* Salida: Codigo 404
"""

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

0 comments on commit 7e3aaf5

Please sign in to comment.