diff --git a/helios/fixtures/legacy-ballots-expected.json b/helios/fixtures/legacy-ballots-expected.json new file mode 100644 index 0000000000000000000000000000000000000000..8e45de4d77442e540ab109a57b95e71e103edf2a --- /dev/null +++ b/helios/fixtures/legacy-ballots-expected.json @@ -0,0 +1 @@ +[{"cast_at": "2010-12-30 11:00:30", "vote_hash": "XMbs8mj8IMfWTIrMeeJ+1ItRtH1fMzrrdasdoZghqms", "voter_hash": "/SnejZYob4Xvxv4gqsvj/ciEouUrrlZPpLTEYWnmgPg", "voter_uuid": "36cab4d2-baf5-4fe6-9316-072bb10a08c5"}] \ No newline at end of file diff --git a/helios/tests.py b/helios/tests.py index 3c5c9fcb5519cee396158ab6ea21bebbac9af418..a60fc5e7542d3a81734fc104b452a84e3eeae775 100644 --- a/helios/tests.py +++ b/helios/tests.py @@ -222,6 +222,7 @@ class LegacyElectionBlackboxTests(TestCase): EXPECTED_ELECTION_FILE = 'helios/fixtures/legacy-election-expected.json' EXPECTED_VOTERS_FILE = 'helios/fixtures/legacy-election-voters-expected.json' EXPECTED_TRUSTEES_FILE = 'helios/fixtures/legacy-trustees-expected.json' + EXPECTED_BALLOTS_FILE = 'helios/fixtures/legacy-ballots-expected.json' def setUp(self): self.election = models.Election.objects.all()[0] @@ -243,6 +244,10 @@ class LegacyElectionBlackboxTests(TestCase): response = self.client.get("/helios/elections/%s/trustees/" % self.election.uuid, follow=False) self.assertEqualsToFile(response, self.EXPECTED_TRUSTEES_FILE) + def test_ballots_list(self): + response = self.client.get("/helios/elections/%s/ballots/" % self.election.uuid, follow=False) + self.assertEqualsToFile(response, self.EXPECTED_BALLOTS_FILE) + class ElectionBlackboxTests(TestCase): fixtures = ['users.json', 'election.json']