From f5ed804cb86ed1c7f14c134e0db1d8b298b3d675 Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Thu, 30 Dec 2010 15:01:57 -0800
Subject: [PATCH] added ballot list legacy testing to tests

---
 helios/fixtures/legacy-ballots-expected.json | 1 +
 helios/tests.py                              | 5 +++++
 2 files changed, 6 insertions(+)
 create mode 100644 helios/fixtures/legacy-ballots-expected.json

diff --git a/helios/fixtures/legacy-ballots-expected.json b/helios/fixtures/legacy-ballots-expected.json
new file mode 100644
index 0000000..8e45de4
--- /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 3c5c9fc..a60fc5e 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']
 
-- 
GitLab