Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Uses latest onegov.ballot
Browse files Browse the repository at this point in the history
  • Loading branch information
msom committed Jan 18, 2019
1 parent eb4e9cd commit e7c4aa0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions onegov/election_day/tests/views/test_views_election.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import date
from freezegun import freeze_time
from math import isclose
from onegov.election_day.tests.common import login
from onegov.election_day.tests.common import MAJORZ_HEADER
from onegov.election_day.tests.common import upload_majorz_election
Expand Down Expand Up @@ -75,9 +76,9 @@ def test_view_election_candidate_by_entity(election_day_app_gr):
for option in view.pyquery('option')
}
assert data['Engler']['3503']['counted'] is True
assert data['Engler']['3503']['percentage'] == 100 * 20 / 41
assert isclose(data['Engler']['3503']['percentage'], 100 * 20 / 21)
assert data['Schmid']['3503']['counted'] is True
assert data['Schmid']['3503']['percentage'] == 100 * 18 / 41
assert isclose(data['Schmid']['3503']['percentage'], 100 * 18 / 21)

for url in (
'/election/proporz-election/candidate-by-entity',
Expand All @@ -92,7 +93,7 @@ def test_view_election_candidate_by_entity(election_day_app_gr):
for option in view.pyquery('option')
}
assert data['Caluori']['3503']['counted'] is True
assert data['Caluori']['3503']['percentage'] == 100 * 2 / 153
assert isclose(data['Caluori']['3503']['percentage'], 100 * 2 / 31)
assert data['Casanova']['3503']['counted'] is True
assert data['Casanova']['3503']['percentage'] == 0.0

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_long_description():
'cached_property',
'cssmin',
'onegov.core>=0.64',
'onegov.ballot>=3.7.3',
'onegov.ballot>=3.7.4',
'onegov.form>=0.37.0',
'onegov.foundation>=0.0.4',
'onegov.pdf>=0.2.0',
Expand Down

0 comments on commit e7c4aa0

Please sign in to comment.