Skip to content

Commit

Permalink
Test: tesd d'hondt negativo completo; EGCETSII#27
Browse files Browse the repository at this point in the history
  • Loading branch information
isamunval committed Jan 6, 2022
1 parent f37a65c commit 35490c3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion decide/postproc/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def test_dhondt(self):

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

def test_dhondt_error(self):
"""
* Definicion: Test negativo que no recibe escaños
Expand All @@ -349,4 +349,14 @@ def test_dhondt_error(self):
{ "option": "Option 6", "number": 6, "votes": 2 },
]
}

expected_result = {
'message': 'Los escaños son insuficientes'
}

response = self.client.post("/postproc/", data, format="json")
self.assertEqual(response.status_code, 200)

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

0 comments on commit 35490c3

Please sign in to comment.