From 368f7eaa2abb9b80b92c9f042e289e7db106c36b Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Sun, 23 Jan 2011 19:51:23 -0800
Subject: [PATCH] full election working, yay.

---
 helios/datatypes/legacy.py | 8 +++++++-
 helios/tests.py            | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/helios/datatypes/legacy.py b/helios/datatypes/legacy.py
index c2a89df..75f8e8f 100644
--- a/helios/datatypes/legacy.py
+++ b/helios/datatypes/legacy.py
@@ -180,7 +180,13 @@ class DLogProof(LegacyObject):
         super(DLogProof,self).__init__(wrapped_obj)
 
 class Result(LegacyObject):
-    pass
+    WRAPPED_OBJ = list
+
+    def loadDataFromDict(self, d):
+        self.wrapped_obj = d
+
+    def toDict(self, complete=False):
+        return self.wrapped_obj
 
 class Questions(LegacyObject):
     WRAPPED_OBJ = list
diff --git a/helios/tests.py b/helios/tests.py
index 203ff00..310e549 100644
--- a/helios/tests.py
+++ b/helios/tests.py
@@ -474,4 +474,4 @@ class ElectionBlackboxTests(TestCase):
 
         # check that tally matches
         response = self.client.get("/helios/elections/%s/result" % election_id)
-        self.assertEquals(utils.from_json(response.content), [0,1])
+        self.assertEquals(utils.from_json(response.content), [[0,1]])
-- 
GitLab