diff --git a/eos/base/tests.py b/eos/base/tests.py index 3306d2b..bd35477 100644 --- a/eos/base/tests.py +++ b/eos/base/tests.py @@ -51,7 +51,7 @@ class ElectionTestCase(EosTestCase): election.name = 'Test Election' for i in range(3): - voter = Voter() + voter = Voter(name=['Alice', 'Bob', 'Charlie'][i]) election.voters.append(voter) # Check _instance self.assertEqual(voter._instance, (election.voters, i)) diff --git a/eos/psr/tests.py b/eos/psr/tests.py index f9cbff3..3e69941 100644 --- a/eos/psr/tests.py +++ b/eos/psr/tests.py @@ -233,7 +233,7 @@ class ElectionTestCase(EosTestCase): election.name = 'Test Election' for i in range(3): - voter = Voter() + voter = Voter(name=['Alice', 'Bob', 'Charlie'][i]) election.voters.append(voter) for i in range(3): diff --git a/eosweb/core/templates/election/view.html b/eosweb/core/templates/election/view.html index a169fe3..38845d7 100644 --- a/eosweb/core/templates/election/view.html +++ b/eosweb/core/templates/election/view.html @@ -65,4 +65,14 @@ {% include eosweb.core.main.model_view_map[question.__class__]['result_raw'] %} {% endfor %} {% endif %} + + {% if election.workflow.get_task('eos.base.workflow.TaskOpenVoting').status < Status.EXITED %} +

Voting booth

+ +

Voting in this election has not yet begun. If you would like to preview the voting booth, click here. Note that you will not be able to cast any ballots until voting opens.

+ {% elif election.workflow.get_task('eos.base.workflow.TaskCloseVoting').status == Status.EXITED %} +

Voting booth

+ +

Voting in this election has concluded. If you would like to review the voting booth, click here. Note that you will no longer be able to cast any ballots.

+ {% endif %} {% endblock %}